Re: [Bluemusic-users] visualizing cmask and ngen
Brought to you by:
kunstmusik
From: Steven Y. <ste...@gm...> - 2006-10-05 14:38:34
|
Hi Menno, I had to make two corrections: one was in the script near the end, "frequency" needed to be changed to "frequency_mask". The other was that the xMax on the index lineObject was set to 10. I looked at other lines and they seemed to be set to 1, so after doing that it seemed to work. steven On 10/4/06, menno <nab...@ya...> wrote: > > Hello Steven, > > would you have a look at this blue file please and tell me what goes wrong. > I,m trying to make a mask of the index (just to get an understanding of how > it works) so copied one of the windows (duration) and changed the scaling of > y to 10. > But i don't see the scaling taking place when generating the data. It stays > within 0 to 1. > Here is the bluefile: > > <blueData version='0.108.0'> > <projectProperties> > <title>ObjectBuilder2 Example</title> > <author>steven yi</author> > <notes>The example ObjectBuilder examples demonstrate the use of > LineObjects in ObjectBuilder to be used as the mask boundaries for a Pmask > script. </notes> > <sampleRate>44100</sampleRate> > <ksmps>16</ksmps> > <channels>2</channels> > <diskSampleRate>44100</diskSampleRate> > <diskKsmps>1</diskKsmps> > <diskChannels>2</diskChannels> > <useAudioOut>true</useAudioOut> > <useAudioIn>false</useAudioIn> > <useMidiIn>false</useMidiIn> > <useMidiOut>false</useMidiOut> > <noteAmpsEnabled>true</noteAmpsEnabled> > <outOfRangeEnabled>true</outOfRangeEnabled> > <warningsEnabled>true</warningsEnabled> > <benchmarkEnabled>true</benchmarkEnabled> > <advancedSettings>csound -d -+rtaudio=alsa -odac:plughw:0,0 -b128 > -+msg_color=false -Q1</advancedSettings> > <completeOverride>true</completeOverride> > <fileName>ObjectBuilder2.wav</fileName> > <askOnRender>false</askOnRender> > <diskNoteAmpsEnabled>true</diskNoteAmpsEnabled> > <diskOutOfRangeEnabled>true</diskOutOfRangeEnabled> > <diskWarningsEnabled>true</diskWarningsEnabled> > <diskBenchmarkEnabled>true</diskBenchmarkEnabled> > <diskAdvancedSettings>csound</diskAdvancedSettings> > <diskCompleteOverride>true</diskCompleteOverride> > </projectProperties> > <arrangement> > <instrumentAssignment arrangementId='1' isEnabled='true'> > <instrument type='blue.orchestra.GenericInstrument'> > <name>untitled</name> > <comment></comment> > <globalOrc>;[once]{ > gi_fm_table ftgen 0, 0, 65537, 10, 1, 0, 0.4, 0.2, 0, 0.1, 0.1 > ;} > </globalOrc> > <globalSco></globalSco> > <instrumentText> ; p2 = onset > ; p3 = duration > ; p4 = base frequency > ; p5 fm index > ; p6 pan (L=0, R=1) > ; p7 = amplitude > > kenv expon 1, p3, 0.01 > kindx expon p5, p3, 0.4 > a1 foscil kenv * p7*1000, p4, 1, 1.143, kindx, gi_fm_table > ;a1 oscil kenv*p7*2000, p4*.1, gi_fm_table > outs a1*(1-p6)*10, a1*p6*10 > </instrumentText> > </instrument> > </instrumentAssignment> > </arrangement> > <mixer> > <enabled>false</enabled> > <extraRenderTime>0.0</extraRenderTime> > <channelList list='channels'> > <channel> > <name>1</name> > <outChannel>Master</outChannel> > <level>0.0</level> > <muted>false</muted> > <solo>false</solo> > <effectsChain bin='pre'/> > <effectsChain bin='post'/> > </channel> > </channelList> > <channelList list='subChannels'/> > <channel> > <name>Master</name> > <outChannel>Master</outChannel> > <level>0.0</level> > <muted>false</muted> > <solo>false</solo> > <effectsChain bin='pre'/> > <effectsChain bin='post'/> > </channel> > </mixer> > <tables></tables> > <soundObjectLibrary/> > <globalOrcSco> > <globalOrc></globalOrc> > <globalSco></globalSco> > </globalOrcSco> > <opcodeList/> > <liveData> > <commandLine>csound -Wdo devaudio -L stdin</commandLine> > </liveData> > <soundObject type='blue.soundObject.PolyObject'> > <subjectiveDuration>2.0</subjectiveDuration> > <startTime>0.0</startTime> > <name>root</name> > <backgroundColor>-10066279</backgroundColor> > <timeBehavior>0</timeBehavior> > <noteProcessorChain/> > <isRoot>true</isRoot> > <pixelSecond>22</pixelSecond> > <heightIndex>2</heightIndex> > <snapEnabled>false</snapEnabled> > <snapValue>1.0</snapValue> > <timeDisplay>0</timeDisplay> > <timeUnit>5</timeUnit> > <soundLayer name='' muted='false' solo='false'> > <noteProcessorChain/> > <soundObject type='blue.soundObject.ObjectBuilder'> > <subjectiveDuration>9.863636</subjectiveDuration> > <startTime>0.2</startTime> > <name>ObjectBuilder</name> > <backgroundColor>-12566464</backgroundColor> > <timeBehavior>0</timeBehavior> > <noteProcessorChain/> > <code>from pmask import * > > def makeTupleList(arr, yAdjust = 1.0): > retVal = [] > for i in range(len(arr) / 2): > indx1 = i * 2 > indx2 = indx1 + 1 > retVal.append((arr[indx1] * 20,arr[indx2] * yAdjust)) > return retVal > > max = makeTupleList([<density_max>]) > min = makeTupleList([<density_min>]) > > density = Mask(UniformRandom(), > PowerSegment(min, 3.0), > PowerSegment(max, 3.0)) > > max = makeTupleList([<duration_max>]) > min = makeTupleList([<duration_min>]) > > duration = Mask(UniformRandom(), > PowerSegment(min, 1.0), > PowerSegment(max, 1.0)) > > max = makeTupleList([<frequnecy_max>]) > min = makeTupleList([<frequnecy_min>]) > > frequency_mask = Mask(UniformRandom(), > PowerSegment(min, 1.0), > PowerSegment(max, 1.0)) > > > max = makeTupleList([<index_max>]) > min = makeTupleList([<index_min>]) > > index = Mask(UniformRandom(), > PowerSegment(min, 1.0), > PowerSegment(max, 1.0)) > > > > panorama = Range(0, 1) > > amplitude = Lorenz('x') > > ss = ScoreSection(0.0, 20.0, 1, density, duration, frequency, index, > panorama, amplitude) > > score = str(ss)</code> > <commandLine/> > <isExternal>false</isExternal> > <graphicInterface> > <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLineObject'> > <objectName>density</objectName> > <x>74</x> > <y>9</y> > <canvasWidth>600</canvasWidth> > <canvasHeight>160</canvasHeight> > <xMax>1.0</xMax> > <relativeXValues>false</relativeXValues> > <separatorType>Comma</separatorType> > <leadingZero>true</leadingZero> > <locked>false</locked> > <lines> > <line name='max' max='1.0' min='0.0' color='-14623488'> > <linePoint x='0.0' y='0.087837815'/> > <linePoint x='1.0' y='0.9864865'/> > </line> > <line name='min' max='1.0' min='0.0' color='-16776961'> > <linePoint x='0.0' y='0.0067567825'/> > <linePoint x='1.0' y='0.9391892'/> > </line> > </lines> > </bsbObject> > <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLineObject'> > <objectName>duration</objectName> > <x>74</x> > <y>194</y> > <canvasWidth>600</canvasWidth> > <canvasHeight>160</canvasHeight> > <xMax>1.0</xMax> > <relativeXValues>false</relativeXValues> > <separatorType>Comma</separatorType> > <leadingZero>true</leadingZero> > <locked>false</locked> > <lines> > <line name='max' max='10.0' min='0.0' color='-14623488'> > <linePoint x='0.0' y='0.06756759'/> > <linePoint x='0.32482994' y='0.06756759'/> > <linePoint x='0.3265306' y='0.9189189'/> > <linePoint x='0.5408163' y='0.060810804'/> > <linePoint x='1.0' y='0.06756759'/> > </line> > <line name='min' max='10.0' min='0.0' color='-16776961'> > <linePoint x='0.0' y='0.01'/> > <linePoint x='1.0' y='0.040540516'/> > </line> > </lines> > </bsbObject> > <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'> > <objectName/> > <x>17</x> > <y>8</y> > <label>Density</label> > </bsbObject> > <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'> > <objectName/> > <x>10</x> > <y>194</y> > <label>Duration</label> > </bsbObject> > <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLineObject'> > <objectName>frequnecy</objectName> > <x>74</x> > <y>379</y> > <canvasWidth>600</canvasWidth> > <canvasHeight>160</canvasHeight> > <xMax>1.0</xMax> > <relativeXValues>false</relativeXValues> > <separatorType>Comma</separatorType> > <leadingZero>true</leadingZero> > <locked>false</locked> > <lines> > <line name='max' max='10000.0' min='20.0' color='-14623488'> > <linePoint x='0.0' y='0.9864865'/> > <linePoint x='0.21938775' y='0.4391892'/> > <linePoint x='0.3452381' y='0.4256757'/> > <linePoint x='0.4506803' y='0.49324322'/> > <linePoint x='1.0' y='1.0'/> > </line> > <line name='min' max='10000.0' min='20.0' color='-16776961'> > <linePoint x='0.0' y='0.20945948'/> > <linePoint x='0.20068027' y='0.3108108'/> > <linePoint x='0.5' y='0.4527027'/> > <linePoint x='1.0' y='0.9391892'/> > </line> > </lines> > </bsbObject> > <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'> > <objectName/> > <x>10</x> > <y>379</y> > <label>Frequency</label> > </bsbObject> > <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLineObject'> > <objectName>index</objectName> > <x>74</x> > <y>572</y> > <canvasWidth>600</canvasWidth> > <canvasHeight>160</canvasHeight> > <xMax>10.0</xMax> > <relativeXValues>false</relativeXValues> > <separatorType>Comma</separatorType> > <leadingZero>true</leadingZero> > <locked>false</locked> > <lines> > <line name='max' max='10.0' min='0.0' color='-14623488'> > <linePoint x='0.0' y='0.087837815'/> > <linePoint x='1.0' y='1.0'/> > </line> > <line name='min' max='10.0' min='0.0' color='-16776961'> > <linePoint x='0.0' y='0.0067567825'/> > <linePoint x='1.0' y='0.9391892'/> > </line> > </lines> > </bsbObject> > <bsbObject type='blue.orchestra.blueSynthBuilder.BSBLabel'> > <objectName/> > <x>16</x> > <y>576</y> > <label>index</label> > </bsbObject> > </graphicInterface> > <presetGroup name='Presets'/> > <syntaxType>Python</syntaxType> > </soundObject> > </soundLayer> > <soundLayer name='' muted='false' solo='false'> > <noteProcessorChain/> > </soundLayer> > <soundLayer name='' muted='false' solo='false'> > <noteProcessorChain/> > </soundLayer> > <soundLayer name='' muted='false' solo='false'> > <noteProcessorChain/> > </soundLayer> > </soundObject> > <scratchPadData> > <isWordWrapEnabled>true</isWordWrapEnabled> > <scratchText/> > </scratchPadData> > <noteProcessorChainMap/> > <renderStartTime>0.0</renderStartTime> > <renderEndTime>11.454545</renderEndTime> > <markersList/> > <loopRendering>false</loopRendering> > </blueData> > -- > View this message in context: http://www.nabble.com/visualizing-cmask-and-ngen-tf2317186.html#a6646741 > Sent from the Csound - Blue - User mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Bluemusic-users mailing list > Blu...@li... > https://lists.sourceforge.net/lists/listinfo/bluemusic-users > |