~kulthauskante/nsynth/devel

« back to all changes in this revision

Viewing changes to Tangibles/Controller/Linear/Base/LinearController.cpp

  • Committer: Karsten Krispin
  • Date: 2011-04-26 15:34:14 UTC
  • Revision ID: karsten@nonlimited.org-20110426153414-c4bsiry51d0s099n
- added SampleWidget (specialized version for SampleTangible )
- added DurationTab (which lets you select a duration in fractions to the main beat )
- Sequencers Step Duration is now selectable by DurationTab
- Sequencer now heads to the right sink
- replaced QList<qreal> by Delay in Tangible/Trigger History-Buffer (List were causing segfaults sometimes)
- Distorion now does "real" distorion
- Cleaned up TabContainerWidget (some polishing in display as well)

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
        _widget = new GeneratorWidget();
36
36
        if(_widget)
37
37
        {
38
 
                _widget->setSteps(64);
 
38
                _widget->setSteps(7);
39
39
                this->setTangibleWidget(_widget);
40
40
        }
41
41
        
50
50
bool LinearController::__process()
51
51
{
52
52
 
53
 
        qreal phase = GlobalMetronome::phase(_widget->activeStep()*(1.0/32.0));
54
 
        
 
53
        qreal fraction = 1.0;
 
54
        switch(_widget->activeStep())
 
55
        {
 
56
                case 0:
 
57
                        fraction = 1.0/32.0;
 
58
                        break;
 
59
                case 1:
 
60
                        fraction = 1.0/16.0;
 
61
                        break;
 
62
                case 2:
 
63
                        fraction = 1.0/8.0;
 
64
                        break;
 
65
                case 3:
 
66
                        fraction = 1.0/4.0;
 
67
                        break;
 
68
                case 4:
 
69
                        fraction = 1.0/2.0;
 
70
                        break;
 
71
                case 5:
 
72
                        fraction = 1.0;
 
73
                        break;
 
74
                case 6:
 
75
                        fraction = 2.0;
 
76
                        break;
 
77
                default:
 
78
                        fraction = 1.0;
 
79
        }
 
80
 
 
81
//      qreal phase = GlobalMetronome::phase(_widget->activeStep()*(1.0/32.0));
 
82
        qreal phase = GlobalMetronome::phase(fraction);
55
83
        switch(_osc.type())
56
84
        {
57
85
                case EOscillatorType::eSine: