~kulthauskante/nsynth/devel

« back to all changes in this revision

Viewing changes to TangibleInterfaces/Input/TangibleConnection.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
        if(outConns.empty())
36
36
                return;
37
37
 
 
38
        Delay & delay = _out->_outPushedHistory;
 
39
        int historySize = delay.size();
 
40
 
38
41
        glPushMatrix();
39
42
                glScaled(m_distance, 0.5, 1.0);
40
 
                qreal deltaX = 1.0/_out->_outPushedHistory.size();
 
43
                qreal deltaX = 1.0/historySize;
41
44
                glTranslated(0.0, 0.0, -0.001);
42
45
                glBegin(GL_QUADS);
43
 
                for(int i = 0; i < _out->_outPushedHistory.size(); i++)
44
 
                {
45
 
                        qreal deltaY = _out->_outPushedHistory[i];
46
 
                        glColor4d(1.0, 1.0, 1.0, 0.4);
47
 
                        glVertex3d(i*deltaX,                                                            -deltaY, 0.0);
48
 
                        glVertex3d(i*deltaX +deltaX -0.005, -deltaY, 0.0);
49
 
                        glVertex3d(i*deltaX     +deltaX -0.005,  deltaY, 0.0);
50
 
                        glVertex3d(i*deltaX,                                                             deltaY, 0.0);
51
 
                }
 
46
                        for(int i = 0; i < historySize; i++)
 
47
                        {
 
48
                                qreal deltaY = delay[historySize-i];
 
49
                                glColor4d(1.0, 1.0, 1.0, 0.4);
 
50
                                glVertex3d(i*deltaX,                                                            -deltaY, 0.0);
 
51
                                glVertex3d(i*deltaX +deltaX -0.005, -deltaY, 0.0);
 
52
                                glVertex3d(i*deltaX     +deltaX -0.005,  deltaY, 0.0);
 
53
                                glVertex3d(i*deltaX,                                                             deltaY, 0.0);
 
54
                        }
52
55
                glEnd();
53
56
        glPopMatrix();
54
57
}