|
Re: NRT options Part II: msg#00160audio.supercollider.devel
Thanks James... I think I understand. Is this closer? <x-tad-smaller> section {</x-tad-smaller><x-tad-smaller>arg</x-tad-smaller><x-tad-smaller> start = 0.0, end = </x-tad-smaller><x-tad-smaller>nil</x-tad-smaller><x-tad-smaller>, configevents = </x-tad-smaller><x-tad-smaller>nil</x-tad-smaller><x-tad-smaller>; ^</x-tad-smaller><x-tad-smaller>this</x-tad-smaller><x-tad-smaller>.class.section(score, start, end, configevents); } *section {</x-tad-smaller><x-tad-smaller>arg</x-tad-smaller><x-tad-smaller> list, start = 0, end = </x-tad-smaller><x-tad-smaller>nil</x-tad-smaller><x-tad-smaller>, configevents = </x-tad-smaller><x-tad-smaller>nil</x-tad-smaller><x-tad-smaller>; </x-tad-smaller><x-tad-smaller> var sectionlist;</x-tad-smaller><x-tad-smaller> end.isNil.if{end = </x-tad-smaller><x-tad-smaller>list</x-tad-smaller><x-tad-smaller>.size - 1][0]}; sectionlist = list.copy; list.copy.do{</x-tad-smaller><x-tad-smaller>arg</x-tad-smaller><x-tad-smaller> me; if((me[0] >= start) && (me[0] <= end), {me[0] = me[0] - start}, {sectionlist.remove(me)})}; sectionlist = sectionlist.add([end - start, [</x-tad-smaller><x-tad-smaller>\c_set</x-tad-smaller><x-tad-smaller>, 0, 0]]); if(configevents.notNil, {if(configevents.isArray, {if(configevents[0] == 0.0, {sectionlist = sectionlist.addFirst(configevents)}, {</x-tad-smaller><x-tad-smaller>"Configuration events should have a timestamp of 0.0"</x-tad-smaller><x-tad-smaller>.warn; ^</x-tad-smaller><x-tad-smaller>nil</x-tad-smaller><x-tad-smaller>})}, {</x-tad-smaller><x-tad-smaller>"Configuration events need to be a bundle array: [time, [events]]"</x-tad-smaller><x-tad-smaller>.warn; ^</x-tad-smaller><x-tad-smaller>nil</x-tad-smaller><x-tad-smaller>})}); ^</x-tad-smaller><x-tad-smaller>this</x-tad-smaller><x-tad-smaller>.new(sectionlist); } recordNRT { </x-tad-smaller><x-tad-smaller>arg</x-tad-smaller><x-tad-smaller> oscFilePath, outputFilePath, inputFilePath, sampleRate = 44100, headerFormat = </x-tad-smaller><x-tad-smaller>"AIFF"</x-tad-smaller><x-tad-smaller>, sampleFormat = </x-tad-smaller><x-tad-smaller>"int16"</x-tad-smaller><x-tad-smaller>, options, completionString=</x-tad-smaller><x-tad-smaller>""</x-tad-smaller><x-tad-smaller>, duration = </x-tad-smaller><x-tad-smaller>nil</x-tad-smaller><x-tad-smaller>; </x-tad-smaller><x-tad-smaller>this</x-tad-smaller><x-tad-smaller>.class.recordNRT( score, oscFilePath, outputFilePath, inputFilePath, sampleRate, headerFormat, sampleFormat, options, completionString, duration ); } *recordNRT { </x-tad-smaller><x-tad-smaller>arg</x-tad-smaller><x-tad-smaller> list, oscFilePath, outputFilePath, inputFilePath, sampleRate = 44100, headerFormat = </x-tad-smaller><x-tad-smaller>"AIFF"</x-tad-smaller><x-tad-smaller>, sampleFormat = </x-tad-smaller><x-tad-smaller>"int16"</x-tad-smaller><x-tad-smaller>, options, completionString=</x-tad-smaller><x-tad-smaller>""</x-tad-smaller><x-tad-smaller>, duration = </x-tad-smaller><x-tad-smaller>nil</x-tad-smaller><x-tad-smaller>; if(duration.notNil, {list = </x-tad-smaller><x-tad-smaller>this</x-tad-smaller><x-tad-smaller>.section(list, 0, duration, </x-tad-smaller><x-tad-smaller>nil</x-tad-smaller><x-tad-smaller>).score}); </x-tad-smaller><x-tad-smaller>this</x-tad-smaller><x-tad-smaller>.write(list, oscFilePath); unixCmd(program + </x-tad-smaller><x-tad-smaller>" -N"</x-tad-smaller><x-tad-smaller> + oscFilePath + (inputFilePath ? </x-tad-smaller><x-tad-smaller>"_"</x-tad-smaller><x-tad-smaller>) + outputFilePath + sampleRate + headerFormat + sampleFormat + (options ?? {</x-tad-smaller><x-tad-smaller>ServerOptions</x-tad-smaller><x-tad-smaller>.new}).asOptionsString + completionString); } </x-tad-smaller> Thanks again for your help! Josh On Aug 18, 2004, at 7:43 PM, James McCartney wrote: On Aug 18, 2004, at 7:31 PM, Joshua Parmenter wrote:****************************************** Joshua D. Parmenter Graduate Student, Music Composition "...Some people think a composer's supposed to please them, but in a way a composer is a chronicler... He's supposed to report on what he's seen and lived." -Charles Mingus _______________________________________________ sc-dev mailing list sc-dev-Ayv8T2snMLBt9CRQqspbbg@xxxxxxxxxxxxxxxx http://www.create.ucsb.edu/mailman/listinfo/sc-dev |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: NRT options Part II: 00160, James McCartney |
|---|---|
| Next by Date: | Re: NRT options Part II: 00160, Joshua Parmenter |
| Previous by Thread: | Re: NRT options Part IIi: 00160, James McCartney |
| Next by Thread: | Re: NRT options Part II: 00160, Joshua Parmenter |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |