|
Re: NRT options Part II: msg#00173audio.supercollider.devel
Once again, sorry to be a bother about this, but could somebody please commit the changes to Score unless any other problems are seen? The changes are below, and a Score.sc file is attached. Thanks, Josh Changes: <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</x-tad-smaller><x-tad-smaller> sectionlist; end.isNil.if{end = list[list.size - 1][0]}; sectionlist = </x-tad-smaller><x-tad-smaller>Array</x-tad-smaller><x-tad-smaller>.new; list.do { </x-tad-smaller><x-tad-smaller>arg</x-tad-smaller><x-tad-smaller> item; if(item[0].inclusivelyBetween(start, end)) { item = item.copy; item[0] = item[0] - start; sectionlist = sectionlist.add(item); } }; 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>
On Aug 19, 2004, at 7:34 PM, Joshua Parmenter wrote: Hi Julian,****************************************** 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: help-files (was: white space in library file names): 00173, Scott Wilson |
|---|---|
| Next by Date: | commit: directory symlinks work in help directory: 00173, Scott Wilson |
| Previous by Thread: | Re: NRT options Part IIi: 00173, Joshua Parmenter |
| Next by Thread: | Re: NRT options Part II: 00173, Julian Rohrhuber |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |