Revision 3:7fb593d53361 CollidoscopeApp/src
| CollidoscopeApp/src/PGranularNode.cpp | ||
|---|---|---|
| 59 | 59 |
void PGranularNode::process (ci::audio::Buffer *buffer ) |
| 60 | 60 |
{
|
| 61 | 61 |
// only update PGranular if the atomic value has changed from the previous time |
| 62 |
|
|
| 63 | 62 |
const boost::optional<size_t> selectionSize = mSelectionSize.get(); |
| 64 | 63 |
if ( selectionSize ){
|
| 65 | 64 |
mPGranularLoop->setSelectionSize( *selectionSize ); |
| ... | ... | |
| 112 | 111 |
} |
| 113 | 112 |
} |
| 114 | 113 |
|
| 114 |
// Called back when new grnular is triggered of turned off. Sends notification message to graphic thread. |
|
| 115 | 115 |
void PGranularNode::operator()( char msgType, int ID ) {
|
| 116 | 116 |
|
| 117 | 117 |
switch ( msgType ){
|
| CollidoscopeApp/src/Wave.cpp | ||
|---|---|---|
| 96 | 96 |
|
| 97 | 97 |
|
| 98 | 98 |
const float wavePixelLen = ( mNumChunks * ( 2 + Chunk::kWidth ) ); |
| 99 |
/* scale the x-axis for the wave to fit the window */ |
|
| 99 |
/* scale the x-axis for the wave to fit the window precisely */
|
|
| 100 | 100 |
gl::scale( ((float)di.getWindowWidth() ) / wavePixelLen , 1.0f); |
| 101 | 101 |
/* draw the chunks */ |
| 102 | 102 |
if (mSelection.isNull()){
|
Also available in: Unified diff