![]() |
Daqarta
Data AcQuisition And Real-Time Analysis
Scope - Spectrum - Spectrogram - Signal Generator
Software for Windows Science with your Sound Card! |
![]() |
![]() |
The following is from the Daqarta Help system:
|
Features:OscilloscopeSpectrum Analyzer 8-Channel
|
Applications:Frequency responseDistortion measurementSpeech and musicMicrophone calibrationLoudspeaker testAuditory phenomenaMusical instrument tuningAnimal soundEvoked potentialsRotating machineryAutomotiveProduct testContact us about
|
|
GlossySticks and GlossyBones MIDI Setups
Introduction:When either setup is loaded, right-clicking on the Pitch-to-MIDI title bar or any non-control portion of the dialog will open Help at this topic. GlossySticks and GlossyBones both use the same multi-voice random pattern strategy that GlossyFish used for tonal voices, only here they apply it to Percussion voices as well. Unlike GlossyFish, these setups start out with all tonal voices toggled off; you will hear an "intro" of only non-tonal Percussion voices for about 20 seconds. This happens because even though the tonal voices are off, their Changes scripts are still running just as though they were playing normally in GlossyFish. At the end of each voice's "song" cycle it toggles itself off for a 4-beat rest, then toggles on for the next song and instrument. The first time, however, it is already in the off state, so there is no sound until the final toggle-on for the next song. After that, the voice plays normally for the remainder of the performance.
Random Note Lags:Both setups share the same random Note Lag technique used by GlossyFish to "humanize" performances. This prevents all notes from starting exactly "on the beat". Here, this technique is extended to Percussion Lag as well, with each Percussion voice getting a new random Lag value whenever its instrument is changed. Although the Note Lag effect is rather subtle in GlossyFish, Percussion Lag is much more noticeable here, particularly during the initial 20-second Percussion-only intro. The reason is that Percussion instruments typically have fast attack and decay times, allowing easy discrimination between events that come close together in time. To hear this for yourself, just change the Ug=2 line at the start of the Voice 1 setup to Ug=0 to get rid of the variable Lag. (It affects both Note Lag and Percussion Lag.) For a visual confirmation of the variable lag, note that the vertical lines of the Percussion instruments in the Pitch Display are not perfectly aligned; some segments of the lines may be offset by one or more line widths.
Tonal and Percussion Pattern Changes:The 8 tonal voices use nearly the same Changes scripts as GlossyFish, except that the random instrument selection is restricted to certain percussive tonal instruments like Steel Drums, Woodblocks, and Timpani. The Velocity Map (at the beginning of the Percussion script) is also modified to allow more beat-to-beat loudness variations in the patterns. The 6 added non-tonal Percussion voices A through F provide a driving beat. Just as for the tonal voices, each of these periodically changes to a new percussion instrument, only here the changes are more frequent. In both GlossySticks and GlossyBones, the tonal voices have variable melody lengths, with velocity patterns that are completely replaced for each new instrument cycle, just as in GlossyFish. In GlossySticks, the Percussion voices behave the same way, with completely new patterns whenever the instrument changes. In GlossyBones, however, the patterns have fixed lengths (set randomly at the start of each performance) and only one random beat of each velocity pattern is changed at a time. This means that the Percussion rhythms slowly evolve instead of jumping to new ones.
Hot-Key Scale Changes:Just like GlossyFish, you can change the Scale used for the tonal voices via hot-keys. The default Pentatonic Major (shifted 'P' key) is light and happy, but be sure to try some of the others. The effect of a scale change is more subtle than in GlossyFish, but Phrygian Blue ('y' hot-key) is still "cool". Also, the short duration of most of the percussive instruments seems to limit the discordant interactions of scales like Chromatic (shifted 'C' hot-key) or some of the random scales ('?' hot-key) that can be rather "difficult" in GlossyFish.
GlossySticks Voice 1 Changes Script:GlossySticks and GlossyBones use nearly identical Voice 1 Changes Scripts. These scripts differ from that of GlossyFish by using a different Buffer Velocity Map, which is no longer in the Voice 1 script but is instead at the start of the Percussion script. In addition, GlossySticks sets the random seed at its start, whereas GlossyBones sets it in its Percussion script (which runs before Voice 1) since it uses random numbers during Percussion initialization. But the biggest difference with GlossyFish is in random instrument selection. GlossyFish selects from among all the instruments in the range of Ui=0 to UI=118 via I1=?(Ui,UI). But here we want to limit the selection to only certain percussive instruments. The basic random ?(min,max) operation doesn't allow us to "hand pick" particular values; it selects uniformly over the given range. So instead we send all the desired instrument numbers to a buffer, in whatever order we choose but leaving no gaps. Then we can randomly select a buffer index from the portion of the buffer we've filled, and use that index to retrieve the instrument number. We start with Bi14.0=(112,7) Increment Fill of the first 7 locations of Voice 1, Buffer 4 with General MIDI "Percussive" tonal instruments (not to be confused with the non-tonal Percussion instruments). The Increment Fill starts with 112 (Tinkle Bell) in the 0th position and fills the next 6 positions with the next 6 numbers, through 118 (Synth Drum) at buffer index 6. Next we use Bb14.7=47 Buffer Direct Access to separately add 47 (Timpani), followed by 14 (Tubular Bells), and 45 (Pizzicato Strings) to buffer positions 7-9. We then set Ui=0 to specify the minimum index, and UI=9 for the maximum. The above operations are done only once, in the initialization section before the infinite loop begins. The first operation of the loop selects the random instrument via I1=B14.?(Ui,UI), which uses Buffer Direct Access to read a random location between 0 and 9 inclusive, and use that as the current Instrument number for Voice 1. The rest of the script is the same as GlossyFish. The remaining voice scripts 2-8 are identical to the infinite loop portion of this Voice 1 script, except for the voice numbers. Note that all voices share the same Buffer 4, Voice 1 for instrument selection. (Any voice can access any buffer, not just the ones with the same number as the voice.) ?s=?(-3G,3G) ;32-bit random seed ;?s=h68E8730C ;Forced repeatable seed ?x=0 ;Set pseudo-random mode oLh=s ;Show random seed UL=7 ;Base pattern lower size limit UU=11 ;Base pattern upper size limit UM=-4 ;Hold Beats lower limit Um=4 ;Hold Beats upper limit UN=80 ;Max random note in pattern Un=40 ;Min random note in pattern Bi14.0=(112,7) ;Fill buffer posns 0-6 with 112-118 Bb14.7=47 ;Set Timpani at posn 7 Bb14.8=14 ;Tubular Bells at posn 8 Bb14.9=45 ;Pizzicato Strings at posn 9 Ui=0 ;Min buffer posn to read UI=9 ;Max buffer posn UV=80 ;Max random Level Uv=48 ;Min random Level Ug=2 ;Max random Note Lag US=S1 ;Default Voice 1 Scale oRS=US ;Show Scale name {! ;Infinite loop I1=B14.?(Ui,UI) ;Random Instrument L1=?(Uv,UV) ;Random Level g1=?r(0,Ug) ;Random Note Lag H1=?(UM,Um) ;Biased random Hold Beats U1=?(UL,UU) ;Random pattern length V1.0="8" ;1st note velocity, always sounds Bf1V.1=(?(0,15),U1-1) ;Random Velocity Pattern Bf11.0=(?(Un,UN),U1) ;Random Note Buffer 1 Fill Bf12.0=(?(Un,UN),U1) ;Random Note Buffer 2 Fill U1=U1*H1 ;Pattern * Hold length {2 ;Play 2 complete verses i1=11 W=2*U1 ;select Buf 1, play twice i1=12 W=U1 ;Buffer 2, play once i1=11 W=U1 ;Buffer 1, play once i1=12 W=U1 ;Buffer 2, play once i1=11 W=U1 ;Buffer 1, play once } ;End of verse s1=1 ;Sustain after 2nd verse X1=0 ;Voice 1 Instrument off W=4 ;Hold (wait) 4 beats s1=0 ;Sustain off W=4 ;Rest 4 beats X1=1 ;Instrument on } ;End of infinite loop
GlossySticks Percussion Changes Script:This Percussion script has to handle a tricky task: It needs to handle all 6 Percussion instruments (A-F), each with its own independent script commands that are run according to independent pattern cycles. For the tonal voices, this was handled by using a dedicated script for each voice. Each worked its way through its own script according to its own pattern cycle. For example, it waited for a specified number of beats while a buffer was automatically played, then waited again while another buffer was played. (See the infinite loop portion of the Voice 1 listing, above.) Since the voices had independent scripts, when Voice 1 was waiting it didn't hold up Voices 2-8. But there is only a single Percussion script, so how do we keep the 6 instruments independent? In particular, when one needs to wait for its pattern cycle to complete, we don't want to hold up the others. The solution is to maintain a separate counter for each of the 6 instruments. On every beat (W=1 at the start of the infinite loop portion) we decrement the A counter QA, then test to see if it has hit zero. If so, we set a new A pattern length Ua with Ua=?(Up,UP), a new A Instrument with IA=?(Uj,UJ), a new A velocity pattern via random buffer fill using BfAV.0=(?(0,15),Ua), and a new lag with gA=?r(0,Ug). Finally, we reset the A counter to the new pattern length times the UR repeat count via QA=UR*Ua. Then, still on the same beat, we repeat everything for instruments B through F. Notice that we don't initialize the A-F counters QA-QF before we start the infinite loop. Instead, we rely on the fact that all user variables are always set to 0 at the start of a performance. The initial decrement of QA thus sets it to -1, which we detect with the [QA<=0 IF test and treat it just like a normal countdown completion, which initializes the A instrument. Likewise for B through F using QB through QF. You may wonder why we toggle Percussion off with XP=0 in the second line, and then toggle it back on one beat later with XP=1 after the W=1 Wait at the start of the infinite loop. That's to hold off Percussion until the instruments are initialized; otherwise, the first beat would use whatever instruments had been last used. The last part of the script (starting with US=S1) is identical to the Percussion script in GlossyFish, allowing hot-keys to change the Scale for the tonal voices. Bv="0_4_4_6_6_6_8888" ;Buffer Velocity Map XP=0 ;Percussion off for 1st beat Up=4 ;Min pattern length UP=9 ;Max pattern length Uj=33 ;Min Percussion instrument UJ=87 ;Max Percussion instrument UR=4 ;Pattern repeat count {! ;Infinite loop W=1 ;Wait 1 beat XP=1 ;Percussion on after 1st beat QA=QA-1 ;Perc A countdown [QA<=0 ;If 0 or less... Ua=?(Up,UP) ;New random pattern length IA=?(Uj,UJ) ;New A instrument BfAV.0=(?(0,15),Ua) ;New velocity pattern gA=?r(0,Ug) ;New Percussion Lag QA=UR*Ua ;Reset count for new total beats ] ;End IF QB=QB-1 ;Perc B countdown [QB<=0 Ub=?(Up,UP) IB=?(Uj,UJ) BfBV.0=(?(0,15),Ub) gB=?r(0,Ug) QB=UR*Ub ] QC=QC-1 ;Perc C countdown [QC<=0 Uc=?(Up,UP) IC=?(Uj,UJ) BfCV.0=(?(0,15),Uc) gC=?r(0,Ug) QC=UR*Uc ] QD=QD-1 ;Perc D countdown [QD<=0 Ud=?(Up,UP) ID=?(Uj,UJ) BfDV.0=(?(0,15),Ud) gD=?r(0,Ug) QD=UR*Ud ] QE=QE-1 ;Perc E countdown [QE<=0 Ue=?(Up,UP) IE=?(Uj,UJ) BfEV.0=(?(0,15),Ue) gE=?r(0,Ug) QE=UR*Ue ] QF=QF-1 ;Perc F countdown [QF<=0 Uf=?(Up,UP) IF=?(Uj,UJ) BfFV.0=(?(0,15),Uf) gF=?r(0,Ug) QF=UR*Uf ] US=S1 ;Set US to Voice 1 Scale UK=K# ;Most-recent key hit [UK>0 ;Any key? If so, test which: [UK="?" US=?r(2048,4095)] ;Random Scale [UK="5" US=2064] ;5th (Power Chord) [UK="6" US=2196] ;Major 6th Chord [UK="7" US=2774] ;Dominant 7th [UK="B" US=2964] :Blues Major [UK="b" US=2418] ;Blues Minor [UK="C" US=4095] ;Chromatic [UK="c" US=2048] ;C-notes only [UK="H" US=2777] ;Harmonic Major [UK="h" US=2905] ;Harmonic Minor [UK="L" US=2741] ;Lydian [UK="l" US=3434] ;Locrian [UK="M" US=2773] ;Major [UK="m" US=2906] ;Natural Minor [UK="P" US=2708] ;Pentatonic Major [UK="p" US=2386] ;Pentatonic Minor [UK="w" US=2730] ;Whole Tone [UK="X" US=2258] ;Mixolydian Pentatonic [UK="y" US=3442] ;Blues Phrygian ] ;End main hot-key test [S2!=US ;If Voice 2 Scale not as above, S9=US ; then update all to new scale oRS=US ;Show scale name or pattern ] } ;End of infinite loop
GlossyBones Voice 1 Changes Script:This is identical to the GlossySticks Voice 1 script except that the initial random seed setup is missing. That's now in the GlossyBones Percussion script. UL=7 ;Base pattern lower size limit UU=11 ;Base pattern upper size limit UM=-4 ;Hold Beats lower limit Um=4 ;Hold Beats upper limit UN=80 ;Max random note in pattern Un=40 ;Min random note in pattern Bi14.0=(112,7) ;Fill buffer posns 0-6 with 112-118 Bb14.7=47 ;Set Timpani at posn 7 Bb14.8=14 ;Tubular Bells at posn 8 Bb14.9=45 ;Pizzicato Strings at posn 9 Ui=0 ;Min buffer posn to read UI=9 ;Max buffer posn UV=80 ;Max random Level Uv=48 ;Min random Level Ug=2 ;Max random Note Lag US=S1 ;Default Voice 1 Scale oRS=US ;Show Scale name {! ;Infinite loop I1=B14.?(Ui,UI) ;Random Instrument L1=?(Uv,UV) ;Random Level g1=?r(0,Ug) ;Random Note Lag H1=?(UM,Um) ;Biased random Hold Beats U1=?(UL,UU) ;Random pattern length V1.0="8" ;1st note velocity, always sounds Bf1V.1=(?(0,15),U1-1) ;Random Velocity Pattern Bf11.0=(?(Un,UN),U1) ;Random Note Buffer 1 Fill Bf12.0=(?(Un,UN),U1) ;Random Note Buffer 2 Fill U1=U1*H1 ;Pattern * Hold length {2 ;Play 2 complete verses i1=11 W=2*U1 ;select Buf 1, play twice i1=12 W=U1 ;Buffer 2, play once i1=11 W=U1 ;Buffer 1, play once i1=12 W=U1 ;Buffer 2, play once i1=11 W=U1 ;Buffer 1, play once } ;End of verse s1=1 ;Sustain after 2nd verse X1=0 ;Voice 1 Instrument off W=4 ;Hold (wait) 4 beats s1=0 ;Sustain off W=4 ;Rest 4 beats X1=1 ;Instrument on } ;End of infinite loop
GlossyBones Percussion Changes Script:Although GlossyBones uses a Voice 1 script that is nearly identical to GlossySticks (and is completely identical for Voices 2-8), the Percussion script differs by using a slightly wider range of instruments, and more importantly by using fixed random pattern lengths and changing only one beat of each pattern per instrument cycle. It also performs the initial random seed setup here instead of Voice 1, since random values are used to initialize the patterns. GlossySticks limited the minimum Percussion instrument to 33 (Click 2) via Uj=33, specifically to avoid the annoying sound of instrument 32 (Click 1). Here, we use the full instrument range of 27-87, but we replace 32 with an extra copy of 47 (Low-Mid Tom). This is done by filling Voice 2, Buffer 4 using an increment fill from 0-87 via Bi24.0=(0,88), then using direct access via Bb24.32=47 to replace the value at index 32 with the chosen value 47. The above steps are done during initialization, before the infinite loop begins the actual performance. Then, when it's time to select a new instrument A (for example), instead of selecting a random number to set the instrument directly via IA=?(Uj,UJ) as in GlossySticks, we use IA=B24.?(Uj,UJ) to select a random index and get the new number from that position in the buffer via direct access. You can choose a different replacement instrument, or replace additional instruments using this same approach. The pattern lengths and Velocity patterns for instruments A-F are all set during initialization. For instrument A, we use Ua=?(Up,UP) to set the pattern to a random length between Up and UP, followed by BfAV.0=(?(0,15),Ua) to fill its Velocity pattern with random velocity characters from the Velocity Map set at the start of the script. Instruments B-F are handled similarly. As with GlossySticks, there is a dedicated counter for each instrument A-F. When a counter reaches 0, we select a new instrument number (see above), then (for A, here) we use buffer fill command BfAV.?(0,Ua-1)=(?(0,15),1) to select a single random position in the Velocity pattern and replace it with a random character from the Velocity Map. This causes the pattern to slowly evolve. Bv="0_4_4_6_6_6_8888" ;Buffer Velocity Map ?s=?(-3G,3G) ;32-bit random seed ;?s=h5A80DDA3 ;Forced repeatable seed ?x=0 ;Set pseudo-random mode oLh=s ;Show random seed XP=0 ;Percussion off for 1st beat Up=4 ;Min pattern length UP=9 ;Max pattern length Uj=27 ;Min Percussion instrument UJ=87 ;Max Percussion instrument Bi24.0=(0,88) ;Fill buffer with 0-87 Bb24.32=47 ;Replace Click 1 with Low-Mid Tom UR=4 ;Pattern repeat count Ua=?(Up,UP) ;Random A pattern length BfAV.0=(?(0,15),Ua) ;Random A Vel fill from Map Ub=?(Up,UP) ;Random B pattern length BfBV.0=(?(0,15),Ub) ;Random B Vel fill from Map Uc=?(Up,UP) ;Random C pattern length BfCV.0=(?(0,15),Uc) ;Random C Vel fill from Map Ud=?(Up,UP) ;Random D pattern length BfDV.0=(?(0,15),Ud) ;Random D Vel fill from Map Ue=?(Up,UP) ;Random E pattern length BfEV.0=(?(0,15),Ue) ;Random E Vel fill from Map Uf=?(Up,UP) ;Random E pattern length BfFV.0=(?(0,15),Uf) ;Random E Vel fill from Map {! ;Infinite loop W=1 ;Wait 1 beat XP=1 ;Percussion on after 1st beat QA=QA-1 ;Perc A countdown [QA<=0 ;If 0 or less... IA=B24.?(Uj,UJ) ;New A instrument BfAV.?(0,Ua-1)=(?(0,15),1) ;New velocity, 1 beat only gA=?r(0,Ug) ;New Percussion Lag QA=UR*Ua ;Reset count for new total beats ] ;End IF QB=QB-1 ;Perc B countdown [QB<=0 IB=B24.?(Uj,UJ) BfBV.?(0,Ub-1)=(?(0,15),1) gB=?r(0,Ug) QB=UR*Ub ] QC=QC-1 ;Perc C countdown [QC<=0 IC=B24.?(Uj,UJ) BfCV.?(0,Uc-1)=(?(0,15),1) gC=?r(0,Ug) QC=UR*Uc ] QD=QD-1 ;Perc D countdown [QD<=0 ID=B24.?(Uj,UJ) BfDV.?(0,Ud-1)=(?(0,15),1) gD=?r(0,Ug) QD=UR*Ud ] QE=QE-1 ;Perc E countdown [QE<=0 IE=B24.?(Uj,UJ) BfEV.?(0,Ue-1)=(?(0,15),1) gE=?r(0,Ug) QE=UR*Ue ] QF=QF-1 ;Perc F countdown [QF<=0 IF=B24.?(Uj,UJ) BfFV.?(0,Uf-1)=(?(0,15),1) gF=?r(0,Ug) QF=UR*Uf ] US=S1 ;Set US to Voice 1 Scale UK=K# ;Most-recent key hit [UK>0 ;Any key? If so, test which: [UK="?" US=?r(2048,4095)] ;Random Scale [UK="5" US=2064] ;5th (Power Chord) [UK="6" US=2196] ;Major 6th Chord [UK="7" US=2774] ;Dominant 7th [UK="B" US=2964] :Blues Major [UK="b" US=2418] ;Blues Minor [UK="C" US=4095] ;Chromatic [UK="c" US=2048] ;C-notes only [UK="H" US=2777] ;Harmonic Major [UK="h" US=2905] ;Harmonic Minor [UK="L" US=2741] ;Lydian [UK="l" US=3434] ;Locrian [UK="M" US=2773] ;Major [UK="m" US=2906] ;Natural Minor [UK="P" US=2708] ;Pentatonic Major [UK="p" US=2386] ;Pentatonic Minor [UK="w" US=2730] ;Whole Tone [UK="X" US=2258] ;Mixolydian Pentatonic [UK="y" US=3442] ;Blues Phrygian ] ;End main hot-key test [S2!=US ;If Voice 2 Scale not as above, S9=US ; then update all to new scale oRS=US ;Show scale name or pattern ] } ;End of infinite loop See also "Glossy" MIDI Setup Family, Example MIDI Setup Files, MIDI Setup Files, Musical Frontiers, DaqMusiq, KaleidoSynth, Pitch-to-MIDI dialog, Pitch Track Toolbox - Overview, Spectrogram / Pitch Track Controls, Spectrogram / Pitch Track (Sgram/PT) ![]() |
|||
GO:
Questions? Comments? Contact us!We respond to ALL inquiries, typically within 24 hrs.INTERSTELLAR RESEARCH: Over 35 Years of Innovative Instrumentation © Copyright 2007 - 2022 by Interstellar Research All rights reserved |