├── config └── install.sh ├── projects ├── ragamatic │ ├── Raga │ ├── Raga.bat │ ├── rawwaves │ │ ├── bee1.raw │ │ ├── dee1.raw │ │ ├── dee2.raw │ │ ├── din1.raw │ │ ├── gun1.raw │ │ ├── jun1.raw │ │ ├── jun2.raw │ │ ├── tak1.raw │ │ ├── tak2.raw │ │ ├── tak3.raw │ │ ├── tak4.raw │ │ ├── DrDoi1.raw │ │ ├── DrDoi2.raw │ │ ├── DrTak1.raw │ │ ├── DrTak2.raw │ │ ├── Drdak2.raw │ │ ├── Drdak3.raw │ │ ├── Drdak4.raw │ │ ├── Drddak1.raw │ │ ├── Drdee1.raw │ │ ├── Drdee2.raw │ │ ├── Drdoo1.raw │ │ ├── Drdoo2.raw │ │ ├── Drdoo3.raw │ │ ├── Drjun1.raw │ │ └── Drjun2.raw │ ├── tcl │ │ └── bitmaps │ │ │ ├── ragamat.bmp │ │ │ └── ragamat2.bmp │ ├── README-raga.txt │ └── ragamatic.sln ├── demo │ ├── Drums │ ├── Banded │ ├── Banded.bat │ ├── Drums.bat │ ├── Modal │ ├── Modal.bat │ ├── Shakers │ ├── StkDemo │ ├── StkDemo.bat │ ├── Voice │ ├── Voice.bat │ ├── Physical │ ├── Physical.bat │ ├── Shakers.bat │ ├── scores │ │ ├── test.ski │ │ ├── README │ │ ├── tubebell.ski │ │ ├── spain.ski │ │ ├── duelingb.ski │ │ ├── pictures.ski │ │ ├── doogie.ski │ │ ├── lacrymos.ski │ │ ├── mandtune.ski │ │ ├── thecars.ski │ │ ├── marimtst.ski │ │ ├── simplgft.ski │ │ └── drumtest.ski │ ├── utilities.h │ └── demo.sln ├── effects │ ├── StkEffects │ ├── StkEffects.bat │ ├── README-effects.txt │ ├── effects.sln │ └── Makefile.in ├── eguitar │ ├── ElectricGuitar │ ├── ElectricGuitar.bat │ ├── utilities.h │ ├── scores │ │ └── test.ski │ ├── eguitar.sln │ └── README-eguitar.txt ├── stk-template.zip └── examples │ ├── midifiles │ ├── jesu.mid │ ├── tango.mid │ └── bwv772.mid │ ├── rawwaves │ └── sinewave.raw │ ├── foursine.cpp │ ├── rtsine.cpp │ ├── sineosc.cpp │ ├── midiprobe.vcxproj.filters │ ├── duplex.vcxproj.filters │ ├── audioprobe.vcxproj.filters │ ├── crtsine.vcxproj.filters │ ├── playsmf.vcxproj.filters │ ├── midiprobe.cpp │ ├── play.vcxproj.filters │ ├── sine.vcxproj.filters │ ├── foursine.vcxproj.filters │ ├── crtsine.cpp │ └── rtsine.vcxproj.filters ├── docs └── html │ ├── doc.png │ ├── bc_s.png │ ├── bdwn.png │ ├── nav_f.png │ ├── nav_g.png │ ├── nav_h.png │ ├── open.png │ ├── tab_a.png │ ├── tab_b.png │ ├── tab_h.png │ ├── tab_s.png │ ├── closed.png │ ├── splitbar.png │ ├── sync_off.png │ ├── sync_on.png │ ├── folderopen.png │ ├── folderclosed.png │ ├── classstk_1_1FM.png │ ├── classstk_1_1Fir.png │ ├── classstk_1_1Iir.png │ ├── classstk_1_1Stk.png │ ├── classstk_1_1ADSR.png │ ├── classstk_1_1Asymp.png │ ├── classstk_1_1BiQuad.png │ ├── classstk_1_1Blit.png │ ├── classstk_1_1Bowed.png │ ├── classstk_1_1Brass.png │ ├── classstk_1_1Chorus.png │ ├── classstk_1_1Cubic.png │ ├── classstk_1_1Delay.png │ ├── classstk_1_1DelayA.png │ ├── classstk_1_1DelayL.png │ ├── classstk_1_1Echo.png │ ├── classstk_1_1Effect.png │ ├── classstk_1_1Filter.png │ ├── classstk_1_1Flute.png │ ├── classstk_1_1Guitar.png │ ├── classstk_1_1JCRev.png │ ├── classstk_1_1Mesh2D.png │ ├── classstk_1_1Modal.png │ ├── classstk_1_1Moog.png │ ├── classstk_1_1Mutex.png │ ├── classstk_1_1NRev.png │ ├── classstk_1_1Noise.png │ ├── classstk_1_1PRCRev.png │ ├── classstk_1_1Rhodey.png │ ├── classstk_1_1Simple.png │ ├── classstk_1_1Sitar.png │ ├── classstk_1_1Socket.png │ ├── classstk_1_1Sphere.png │ ├── classstk_1_1Thread.png │ ├── classstk_1_1Twang.png │ ├── classstk_1_1Voicer.png │ ├── classstk_1_1Wurley.png │ ├── classstk_1_1WvIn.png │ ├── classstk_1_1WvOut.png │ ├── classstk_1_1BandedWG.png │ ├── classstk_1_1BeeThree.png │ ├── classstk_1_1BlitSaw.png │ ├── classstk_1_1BlowBotl.png │ ├── classstk_1_1BlowHole.png │ ├── classstk_1_1BowTable.png │ ├── classstk_1_1Clarinet.png │ ├── classstk_1_1Drummer.png │ ├── classstk_1_1Envelope.png │ ├── classstk_1_1FMVoices.png │ ├── classstk_1_1FileLoop.png │ ├── classstk_1_1FileRead.png │ ├── classstk_1_1FileWvIn.png │ ├── classstk_1_1FormSwep.png │ ├── classstk_1_1FreeVerb.png │ ├── classstk_1_1Function.png │ ├── classstk_1_1HevyMetl.png │ ├── classstk_1_1InetWvIn.png │ ├── classstk_1_1Instrmnt.png │ ├── classstk_1_1JetTable.png │ ├── classstk_1_1Mandolin.png │ ├── classstk_1_1Messager.png │ ├── classstk_1_1ModalBar.png │ ├── classstk_1_1Modulate.png │ ├── classstk_1_1OnePole.png │ ├── classstk_1_1OneZero.png │ ├── classstk_1_1PercFlut.png │ ├── classstk_1_1Phonemes.png │ ├── classstk_1_1PitShift.png │ ├── classstk_1_1Plucked.png │ ├── classstk_1_1PoleZero.png │ ├── classstk_1_1Recorder.png │ ├── classstk_1_1Resonate.png │ ├── classstk_1_1Sampler.png │ ├── classstk_1_1Saxofony.png │ ├── classstk_1_1Shakers.png │ ├── classstk_1_1SineWave.png │ ├── classstk_1_1SingWave.png │ ├── classstk_1_1StifKarp.png │ ├── classstk_1_1TapDelay.png │ ├── classstk_1_1TubeBell.png │ ├── classstk_1_1TwoPole.png │ ├── classstk_1_1TwoZero.png │ ├── classstk_1_1Vector3D.png │ ├── classstk_1_1VoicForm.png │ ├── classstk_1_1Whistle.png │ ├── classstk_1_1ArdBtSource.png │ ├── classstk_1_1ArdI2SOut.png │ ├── classstk_1_1BlitSquare.png │ ├── classstk_1_1FileWrite.png │ ├── classstk_1_1FileWvOut.png │ ├── classstk_1_1Generator.png │ ├── classstk_1_1Granulate.png │ ├── classstk_1_1InetWvOut.png │ ├── classstk_1_1MemoryLoop.png │ ├── classstk_1_1MemoryWvIn.png │ ├── classstk_1_1ReedTable.png │ ├── classstk_1_1UdpSocket.png │ ├── classstk_1_1ArdCommonOut.png │ ├── classstk_1_1ArdStreamOut.png │ ├── classstk_1_1LentPitShift.png │ ├── classstk_1_1ArdStreamHexOut.png │ ├── classstk_1_1ArdStreamTextOut.png │ ├── classstk_1_1ArdStreamOutCommon.png │ ├── functions_func_j.html │ ├── functions_func_q.html │ ├── functions_j.html │ ├── functions_q.html │ ├── dir_68267d1309a1af8e8297ef4c3efbcdba.html │ ├── functions_func_h.html │ ├── functions_func_u.html │ ├── functions_u.html │ ├── functions_h.html │ ├── classstk_1_1ArdUdp-members.html │ ├── structstk_1_1VFS__FD-members.html │ └── pages.html ├── rawwaves ├── ahh.raw ├── dope.raw ├── eee.raw ├── ooo.raw ├── mand1.raw ├── mand10.raw ├── mand11.raw ├── mand12.raw ├── mand2.raw ├── mand3.raw ├── mand4.raw ├── mand5.raw ├── mand6.raw ├── mand7.raw ├── mand8.raw ├── mand9.raw ├── bassdrum.raw ├── britestk.raw ├── cowbell1.raw ├── crashcym.raw ├── fwavblnk.raw ├── halfwave.raw ├── hihatcym.raw ├── impuls10.raw ├── impuls20.raw ├── impuls40.raw ├── mandpluk.raw ├── marmstk1.raw ├── peksblnk.raw ├── ppksblnk.raw ├── ridecymb.raw ├── sineblnk.raw ├── sinewave.raw ├── snardrum.raw ├── snglpeak.raw ├── tambourn.raw ├── tomhidrm.raw ├── tomlowdr.raw ├── tommiddr.raw ├── twopeaks.raw ├── silence.raw ├── sine.c ├── makemidi.c └── makefunc.c ├── iOS ├── demo │ ├── iOS Demo │ │ ├── en.lproj │ │ │ └── InfoPlist.strings │ │ ├── ViewController.h │ │ ├── AppDelegate.h │ │ ├── main.m │ │ ├── iOS Demo-Prefix.pch │ │ ├── Images.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ │ └── LaunchImage.launchimage │ │ │ │ └── Contents.json │ │ ├── AppDelegate.m │ │ └── iOS Demo-Info.plist │ ├── iOS DemoTests │ │ ├── en.lproj │ │ │ └── InfoPlist.strings │ │ ├── iOS DemoTests-Info.plist │ │ └── iOS_DemoTests.m │ ├── iOS Demo.xcodeproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ └── iOS Demo.xccheckout │ └── README.md └── STK.xcodeproj │ └── project.xcworkspace │ └── contents.xcworkspacedata ├── examples ├── Noise │ └── Noise.ino ├── HelloSine │ └── HelloSine.ino ├── NoiseWithFrames │ └── NoiseWithFrames.ino ├── FileLoop │ └── FileLoop.ino ├── MemoryLoop │ └── MemoryLoop.ino ├── MIDI │ ├── MidiSerial │ │ └── MidiSerial.ino │ ├── AppleMidi │ │ └── AppleMidi.ino │ └── AppleMidiAudioKit │ │ └── AppleMidiAudioKit.ino ├── UDP │ └── UDP.ino ├── Instrument │ ├── Instrument.ino │ └── CMakeLists.txt ├── OutToBluetooth │ └── OutToBluetooth.ino ├── InstrumentToI2S │ └── InstrumentToI2S.ino ├── InstrumentToAudioToolsI2S │ └── InstrumentToAudioToolsI2S.ino └── PerformanceMemory │ └── PerformanceMemory.ino ├── src ├── ArdConfig.cpp ├── ArdStkLogger.h ├── ArdStreamHexOut.cpp ├── ArdStreamTextOut.cpp ├── ArdCommonOut.cpp ├── ArdStreamTextOut.h ├── ArdStkLogger.cpp ├── Noise.cpp ├── ArdStreamHexOut.h ├── ArdStreamOut.cpp ├── ArdUdp.h ├── Function.h ├── ArdStreamOut.h ├── OneZero.cpp ├── Modulate.cpp ├── raw │ ├── zz-raw-eee.cpp │ └── zz-raw-ooo.cpp ├── Echo.cpp ├── Sampler.cpp ├── ArdBtSource.h ├── ArdUdp.cpp ├── WvIn.h ├── Sphere.cpp ├── SingWave.cpp ├── Chorus.cpp ├── OnePole.cpp ├── Vector3D.h ├── Generator.h ├── ModalBar.h ├── Phonemes.h ├── ArdCommonOut.h ├── Socket.cpp ├── PoleZero.cpp ├── Envelope.cpp ├── Fir.cpp └── LentPitShift.cpp ├── library.properties ├── library.json ├── CMakeLists.txt ├── Makefile.in ├── LICENSE └── STK.podspec /config/install.sh: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /projects/ragamatic/Raga: -------------------------------------------------------------------------------- 1 | wish < tcl/Raga.tcl | ./ragamat -ip 2 | -------------------------------------------------------------------------------- /projects/ragamatic/Raga.bat: -------------------------------------------------------------------------------- 1 | wish < tcl/Raga.tcl | ragamat -ip 2 | -------------------------------------------------------------------------------- /projects/demo/Drums: -------------------------------------------------------------------------------- 1 | wish < tcl/Drums.tcl | ./stk-demo Drummer -or -ip 2 | -------------------------------------------------------------------------------- /projects/effects/StkEffects: -------------------------------------------------------------------------------- 1 | wish < tcl/Effects.tcl | ./effects -ip 2 | -------------------------------------------------------------------------------- /projects/effects/StkEffects.bat: -------------------------------------------------------------------------------- 1 | wish < tcl/Effects.tcl | effects -ip 2 | -------------------------------------------------------------------------------- /projects/demo/Banded: -------------------------------------------------------------------------------- 1 | wish < tcl/Banded.tcl | ./stk-demo BandedWG -or -ip 2 | -------------------------------------------------------------------------------- /projects/demo/Banded.bat: -------------------------------------------------------------------------------- 1 | wish < tcl/Banded.tcl | stk-demo BandedWG -or -ip 2 | -------------------------------------------------------------------------------- /projects/demo/Drums.bat: -------------------------------------------------------------------------------- 1 | wish < tcl/Drums.tcl | stk-demo Drummer -or -ip 2 | -------------------------------------------------------------------------------- /projects/demo/Modal: -------------------------------------------------------------------------------- 1 | wish < tcl/Modal.tcl | ./stk-demo ModalBar -or -ip 2 | -------------------------------------------------------------------------------- /projects/demo/Modal.bat: -------------------------------------------------------------------------------- 1 | wish < tcl/Modal.tcl | stk-demo ModalBar -or -ip 2 | -------------------------------------------------------------------------------- /projects/demo/Shakers: -------------------------------------------------------------------------------- 1 | wish < tcl/Shakers.tcl | ./stk-demo Shakers -or -ip 2 | -------------------------------------------------------------------------------- /projects/demo/StkDemo: -------------------------------------------------------------------------------- 1 | wish < tcl/Demo.tcl | ./stk-demo Clarinet -or -ip 2 | -------------------------------------------------------------------------------- /projects/demo/StkDemo.bat: -------------------------------------------------------------------------------- 1 | wish < tcl/Demo.tcl | stk-demo Clarinet -or -ip 2 | -------------------------------------------------------------------------------- /projects/demo/Voice: -------------------------------------------------------------------------------- 1 | wish < tcl/Voice.tcl | ./stk-demo FMVoices -or -ip 2 | -------------------------------------------------------------------------------- /projects/demo/Voice.bat: -------------------------------------------------------------------------------- 1 | wish < tcl/Voice.tcl | stk-demo FMVoices -or -ip 2 | -------------------------------------------------------------------------------- /projects/eguitar/ElectricGuitar: -------------------------------------------------------------------------------- 1 | wish < tcl/Eguitar.tcl | ./eguitar -or -ip 2 | -------------------------------------------------------------------------------- /projects/demo/Physical: -------------------------------------------------------------------------------- 1 | wish < tcl/Physical.tcl | ./stk-demo Clarinet -or -ip 2 | -------------------------------------------------------------------------------- /projects/demo/Physical.bat: -------------------------------------------------------------------------------- 1 | wish < tcl/Physical.tcl | stk-demo Clarinet -or -ip 2 | -------------------------------------------------------------------------------- /projects/demo/Shakers.bat: -------------------------------------------------------------------------------- 1 | wish < tcl/Shakers.tcl | stk-demo Shakers -or -ip 2 | -------------------------------------------------------------------------------- /projects/eguitar/ElectricGuitar.bat: -------------------------------------------------------------------------------- 1 | wish < tcl/EGuitar.tcl | eguitar -or -ip 2 | -------------------------------------------------------------------------------- /docs/html/doc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/doc.png -------------------------------------------------------------------------------- /rawwaves/ahh.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/ahh.raw -------------------------------------------------------------------------------- /rawwaves/dope.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/dope.raw -------------------------------------------------------------------------------- /rawwaves/eee.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/eee.raw -------------------------------------------------------------------------------- /rawwaves/ooo.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/ooo.raw -------------------------------------------------------------------------------- /docs/html/bc_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/bc_s.png -------------------------------------------------------------------------------- /docs/html/bdwn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/bdwn.png -------------------------------------------------------------------------------- /docs/html/nav_f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/nav_f.png -------------------------------------------------------------------------------- /docs/html/nav_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/nav_g.png -------------------------------------------------------------------------------- /docs/html/nav_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/nav_h.png -------------------------------------------------------------------------------- /docs/html/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/open.png -------------------------------------------------------------------------------- /docs/html/tab_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/tab_a.png -------------------------------------------------------------------------------- /docs/html/tab_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/tab_b.png -------------------------------------------------------------------------------- /docs/html/tab_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/tab_h.png -------------------------------------------------------------------------------- /docs/html/tab_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/tab_s.png -------------------------------------------------------------------------------- /iOS/demo/iOS Demo/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /rawwaves/mand1.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/mand1.raw -------------------------------------------------------------------------------- /rawwaves/mand10.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/mand10.raw -------------------------------------------------------------------------------- /rawwaves/mand11.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/mand11.raw -------------------------------------------------------------------------------- /rawwaves/mand12.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/mand12.raw -------------------------------------------------------------------------------- /rawwaves/mand2.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/mand2.raw -------------------------------------------------------------------------------- /rawwaves/mand3.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/mand3.raw -------------------------------------------------------------------------------- /rawwaves/mand4.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/mand4.raw -------------------------------------------------------------------------------- /rawwaves/mand5.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/mand5.raw -------------------------------------------------------------------------------- /rawwaves/mand6.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/mand6.raw -------------------------------------------------------------------------------- /rawwaves/mand7.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/mand7.raw -------------------------------------------------------------------------------- /rawwaves/mand8.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/mand8.raw -------------------------------------------------------------------------------- /rawwaves/mand9.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/mand9.raw -------------------------------------------------------------------------------- /docs/html/closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/closed.png -------------------------------------------------------------------------------- /docs/html/splitbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/splitbar.png -------------------------------------------------------------------------------- /docs/html/sync_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/sync_off.png -------------------------------------------------------------------------------- /docs/html/sync_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/sync_on.png -------------------------------------------------------------------------------- /iOS/demo/iOS DemoTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /rawwaves/bassdrum.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/bassdrum.raw -------------------------------------------------------------------------------- /rawwaves/britestk.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/britestk.raw -------------------------------------------------------------------------------- /rawwaves/cowbell1.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/cowbell1.raw -------------------------------------------------------------------------------- /rawwaves/crashcym.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/crashcym.raw -------------------------------------------------------------------------------- /rawwaves/fwavblnk.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/fwavblnk.raw -------------------------------------------------------------------------------- /rawwaves/halfwave.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/halfwave.raw -------------------------------------------------------------------------------- /rawwaves/hihatcym.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/hihatcym.raw -------------------------------------------------------------------------------- /rawwaves/impuls10.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/impuls10.raw -------------------------------------------------------------------------------- /rawwaves/impuls20.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/impuls20.raw -------------------------------------------------------------------------------- /rawwaves/impuls40.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/impuls40.raw -------------------------------------------------------------------------------- /rawwaves/mandpluk.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/mandpluk.raw -------------------------------------------------------------------------------- /rawwaves/marmstk1.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/marmstk1.raw -------------------------------------------------------------------------------- /rawwaves/peksblnk.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/peksblnk.raw -------------------------------------------------------------------------------- /rawwaves/ppksblnk.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/ppksblnk.raw -------------------------------------------------------------------------------- /rawwaves/ridecymb.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/ridecymb.raw -------------------------------------------------------------------------------- /rawwaves/sineblnk.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/sineblnk.raw -------------------------------------------------------------------------------- /rawwaves/sinewave.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/sinewave.raw -------------------------------------------------------------------------------- /rawwaves/snardrum.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/snardrum.raw -------------------------------------------------------------------------------- /rawwaves/snglpeak.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/snglpeak.raw -------------------------------------------------------------------------------- /rawwaves/tambourn.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/tambourn.raw -------------------------------------------------------------------------------- /rawwaves/tomhidrm.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/tomhidrm.raw -------------------------------------------------------------------------------- /rawwaves/tomlowdr.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/tomlowdr.raw -------------------------------------------------------------------------------- /rawwaves/tommiddr.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/tommiddr.raw -------------------------------------------------------------------------------- /rawwaves/twopeaks.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/rawwaves/twopeaks.raw -------------------------------------------------------------------------------- /docs/html/folderopen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/folderopen.png -------------------------------------------------------------------------------- /docs/html/folderclosed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/folderclosed.png -------------------------------------------------------------------------------- /projects/stk-template.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/stk-template.zip -------------------------------------------------------------------------------- /docs/html/classstk_1_1FM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1FM.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Fir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Fir.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Iir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Iir.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Stk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Stk.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1ADSR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1ADSR.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Asymp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Asymp.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1BiQuad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1BiQuad.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Blit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Blit.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Bowed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Bowed.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Brass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Brass.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Chorus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Chorus.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Cubic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Cubic.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Delay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Delay.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1DelayA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1DelayA.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1DelayL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1DelayL.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Echo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Echo.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Effect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Effect.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Filter.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Flute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Flute.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Guitar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Guitar.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1JCRev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1JCRev.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Mesh2D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Mesh2D.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Modal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Modal.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Moog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Moog.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Mutex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Mutex.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1NRev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1NRev.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Noise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Noise.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1PRCRev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1PRCRev.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Rhodey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Rhodey.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Simple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Simple.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Sitar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Sitar.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Socket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Socket.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Sphere.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Sphere.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Thread.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Thread.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Twang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Twang.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Voicer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Voicer.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Wurley.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Wurley.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1WvIn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1WvIn.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1WvOut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1WvOut.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1BandedWG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1BandedWG.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1BeeThree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1BeeThree.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1BlitSaw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1BlitSaw.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1BlowBotl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1BlowBotl.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1BlowHole.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1BlowHole.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1BowTable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1BowTable.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Clarinet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Clarinet.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Drummer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Drummer.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Envelope.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Envelope.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1FMVoices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1FMVoices.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1FileLoop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1FileLoop.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1FileRead.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1FileRead.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1FileWvIn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1FileWvIn.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1FormSwep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1FormSwep.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1FreeVerb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1FreeVerb.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Function.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Function.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1HevyMetl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1HevyMetl.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1InetWvIn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1InetWvIn.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Instrmnt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Instrmnt.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1JetTable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1JetTable.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Mandolin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Mandolin.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Messager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Messager.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1ModalBar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1ModalBar.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Modulate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Modulate.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1OnePole.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1OnePole.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1OneZero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1OneZero.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1PercFlut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1PercFlut.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Phonemes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Phonemes.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1PitShift.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1PitShift.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Plucked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Plucked.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1PoleZero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1PoleZero.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Recorder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Recorder.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Resonate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Resonate.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Sampler.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Sampler.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Saxofony.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Saxofony.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Shakers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Shakers.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1SineWave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1SineWave.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1SingWave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1SingWave.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1StifKarp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1StifKarp.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1TapDelay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1TapDelay.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1TubeBell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1TubeBell.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1TwoPole.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1TwoPole.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1TwoZero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1TwoZero.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Vector3D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Vector3D.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1VoicForm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1VoicForm.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Whistle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Whistle.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1ArdBtSource.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1ArdBtSource.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1ArdI2SOut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1ArdI2SOut.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1BlitSquare.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1BlitSquare.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1FileWrite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1FileWrite.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1FileWvOut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1FileWvOut.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Generator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Generator.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1Granulate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1Granulate.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1InetWvOut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1InetWvOut.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1MemoryLoop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1MemoryLoop.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1MemoryWvIn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1MemoryWvIn.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1ReedTable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1ReedTable.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1UdpSocket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1UdpSocket.png -------------------------------------------------------------------------------- /projects/examples/midifiles/jesu.mid: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/examples/midifiles/jesu.mid -------------------------------------------------------------------------------- /projects/examples/midifiles/tango.mid: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/examples/midifiles/tango.mid -------------------------------------------------------------------------------- /projects/ragamatic/rawwaves/bee1.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/ragamatic/rawwaves/bee1.raw -------------------------------------------------------------------------------- /projects/ragamatic/rawwaves/dee1.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/ragamatic/rawwaves/dee1.raw -------------------------------------------------------------------------------- /projects/ragamatic/rawwaves/dee2.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/ragamatic/rawwaves/dee2.raw -------------------------------------------------------------------------------- /projects/ragamatic/rawwaves/din1.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/ragamatic/rawwaves/din1.raw -------------------------------------------------------------------------------- /projects/ragamatic/rawwaves/gun1.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/ragamatic/rawwaves/gun1.raw -------------------------------------------------------------------------------- /projects/ragamatic/rawwaves/jun1.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/ragamatic/rawwaves/jun1.raw -------------------------------------------------------------------------------- /projects/ragamatic/rawwaves/jun2.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/ragamatic/rawwaves/jun2.raw -------------------------------------------------------------------------------- /projects/ragamatic/rawwaves/tak1.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/ragamatic/rawwaves/tak1.raw -------------------------------------------------------------------------------- /projects/ragamatic/rawwaves/tak2.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/ragamatic/rawwaves/tak2.raw -------------------------------------------------------------------------------- /projects/ragamatic/rawwaves/tak3.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/ragamatic/rawwaves/tak3.raw -------------------------------------------------------------------------------- /projects/ragamatic/rawwaves/tak4.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/ragamatic/rawwaves/tak4.raw -------------------------------------------------------------------------------- /docs/html/classstk_1_1ArdCommonOut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1ArdCommonOut.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1ArdStreamOut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1ArdStreamOut.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1LentPitShift.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1LentPitShift.png -------------------------------------------------------------------------------- /projects/examples/midifiles/bwv772.mid: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/examples/midifiles/bwv772.mid -------------------------------------------------------------------------------- /projects/examples/rawwaves/sinewave.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/examples/rawwaves/sinewave.raw -------------------------------------------------------------------------------- /projects/ragamatic/rawwaves/DrDoi1.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/ragamatic/rawwaves/DrDoi1.raw -------------------------------------------------------------------------------- /projects/ragamatic/rawwaves/DrDoi2.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/ragamatic/rawwaves/DrDoi2.raw -------------------------------------------------------------------------------- /projects/ragamatic/rawwaves/DrTak1.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/ragamatic/rawwaves/DrTak1.raw -------------------------------------------------------------------------------- /projects/ragamatic/rawwaves/DrTak2.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/ragamatic/rawwaves/DrTak2.raw -------------------------------------------------------------------------------- /projects/ragamatic/rawwaves/Drdak2.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/ragamatic/rawwaves/Drdak2.raw -------------------------------------------------------------------------------- /projects/ragamatic/rawwaves/Drdak3.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/ragamatic/rawwaves/Drdak3.raw -------------------------------------------------------------------------------- /projects/ragamatic/rawwaves/Drdak4.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/ragamatic/rawwaves/Drdak4.raw -------------------------------------------------------------------------------- /projects/ragamatic/rawwaves/Drddak1.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/ragamatic/rawwaves/Drddak1.raw -------------------------------------------------------------------------------- /projects/ragamatic/rawwaves/Drdee1.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/ragamatic/rawwaves/Drdee1.raw -------------------------------------------------------------------------------- /projects/ragamatic/rawwaves/Drdee2.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/ragamatic/rawwaves/Drdee2.raw -------------------------------------------------------------------------------- /projects/ragamatic/rawwaves/Drdoo1.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/ragamatic/rawwaves/Drdoo1.raw -------------------------------------------------------------------------------- /projects/ragamatic/rawwaves/Drdoo2.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/ragamatic/rawwaves/Drdoo2.raw -------------------------------------------------------------------------------- /projects/ragamatic/rawwaves/Drdoo3.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/ragamatic/rawwaves/Drdoo3.raw -------------------------------------------------------------------------------- /projects/ragamatic/rawwaves/Drjun1.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/ragamatic/rawwaves/Drjun1.raw -------------------------------------------------------------------------------- /projects/ragamatic/rawwaves/Drjun2.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/ragamatic/rawwaves/Drjun2.raw -------------------------------------------------------------------------------- /docs/html/classstk_1_1ArdStreamHexOut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1ArdStreamHexOut.png -------------------------------------------------------------------------------- /docs/html/classstk_1_1ArdStreamTextOut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1ArdStreamTextOut.png -------------------------------------------------------------------------------- /projects/ragamatic/tcl/bitmaps/ragamat.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/ragamatic/tcl/bitmaps/ragamat.bmp -------------------------------------------------------------------------------- /docs/html/classstk_1_1ArdStreamOutCommon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/docs/html/classstk_1_1ArdStreamOutCommon.png -------------------------------------------------------------------------------- /projects/ragamatic/tcl/bitmaps/ragamat2.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pschatzmann/arduino-stk/HEAD/projects/ragamatic/tcl/bitmaps/ragamat2.bmp -------------------------------------------------------------------------------- /projects/demo/scores/test.ski: -------------------------------------------------------------------------------- 1 | /* Howdy!! SKINI File, Perry Cook */ 2 | NoteOn 0.2 1 60 127.000000 3 | NoteOff 0.6 1 60 63.500000 4 | -------------------------------------------------------------------------------- /iOS/STK.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /iOS/demo/iOS Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /iOS/demo/iOS Demo/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // iOS Demo 4 | // 5 | // Created by Ariel Elkin on 03/03/2014. 6 | // 7 | 8 | #import 9 | 10 | @interface ViewController : UIViewController 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /iOS/demo/iOS Demo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // iOS Demo 4 | // 5 | // Created by Ariel Elkin on 03/03/2014. 6 | // 7 | 8 | #import 9 | 10 | @interface AppDelegate : UIResponder 11 | 12 | @property (strong, nonatomic) UIWindow *window; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /examples/Noise/Noise.ino: -------------------------------------------------------------------------------- 1 | #include "Noise.h" 2 | using namespace stk; 3 | 4 | void setup() { 5 | Serial.begin(115200); 6 | 7 | StkFloat output; 8 | Noise noise; 9 | for ( unsigned int i=0; i<20; i++ ) { 10 | output = noise.tick(); 11 | Serial.println(output); 12 | } 13 | } 14 | 15 | void loop() { 16 | } 17 | -------------------------------------------------------------------------------- /projects/eguitar/utilities.h: -------------------------------------------------------------------------------- 1 | // Miscellaneous parsing and error functions for use with STK projects. 2 | // 3 | // Gary P. Scavone, 1999. 4 | 5 | #include "FileWvOut.h" 6 | #include "Messager.h" 7 | 8 | void usage(char *function); 9 | 10 | int checkArgs(int numArgs, char *args[]); 11 | 12 | bool parseArgs(int numArgs, char *args[], stk::WvOut **output, stk::Messager& messager); 13 | -------------------------------------------------------------------------------- /examples/HelloSine/HelloSine.ino: -------------------------------------------------------------------------------- 1 | #include "SineWave.h" 2 | #include "ArdStreamOut.h" 3 | 4 | using namespace stk; 5 | 6 | SineWave input; 7 | ArdStreamOut output(Serial); 8 | 9 | void setup() { 10 | Serial.begin(115200); 11 | 12 | Stk::setSampleRate( 44100.0 ); 13 | input.setFrequency( 440.0 ); 14 | } 15 | 16 | void loop() { 17 | output.tick( input.tick() ); 18 | } 19 | 20 | -------------------------------------------------------------------------------- /src/ArdConfig.cpp: -------------------------------------------------------------------------------- 1 | #include "ArdConfig.h" 2 | 3 | #ifdef STK_ERROR_MSG_LEN 4 | char stk_error_msg[STK_ERROR_MSG_LEN]; 5 | #endif 6 | 7 | 8 | #ifdef ARDUINO_ARCH_RP2040 9 | extern "C" void __sync_synchronize() {} 10 | #endif 11 | 12 | // not sure why this is needed 13 | #if defined(__USE_STM32_HACK__) 14 | extern "C" int _open() {return -1;} 15 | extern "C" int _gettimeofday() {return -1;} 16 | #endif -------------------------------------------------------------------------------- /library.properties: -------------------------------------------------------------------------------- 1 | name=Arduino-STK 2 | version=4.6.2 3 | author=Phil Schatzmann 4 | maintainer=Phil Schatzmann 5 | sentence=The Synthesis ToolKit in C++ (STK) 6 | paragraph=Syntheizer which plays on an I2S DAC or a software-driven delta-sigma DAC and 1-transistor amplifier. 7 | category=Signal Input/Output 8 | url=https://github.com/pschatzmann/Arduino-STK 9 | architectures=esp8266,esp32,rp2040,stm32 10 | 11 | -------------------------------------------------------------------------------- /examples/NoiseWithFrames/NoiseWithFrames.ino: -------------------------------------------------------------------------------- 1 | #include "Noise.h" 2 | using namespace stk; 3 | 4 | Noise noise; 5 | StkFrames output(20, 1); // initialize StkFrames to 20 frames and 1 channel (default: interleaved) 6 | 7 | void setup() { 8 | Serial.begin(115200); 9 | } 10 | 11 | void loop() { 12 | noise.tick( output ); 13 | for ( unsigned int i=0; i 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /iOS/demo/iOS Demo/iOS Demo-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_3_0 10 | #warning "This project uses features only available in iOS SDK 3.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /rawwaves/silence.raw: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /iOS/demo/iOS Demo/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /src/ArdStkLogger.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define STK_LOGD(fmt,...) stk_log(StkDebug, fmt, ##__VA_ARGS__) 4 | #define STK_LOGI(fmt,...) stk_log(StkInfo, fmt, ##__VA_ARGS__) 5 | #define STK_LOGW(fmt,...) stk_log(StkWarning, fmt, ##__VA_ARGS__) 6 | #define STK_LOGE(fmt,...) stk_log(StkError, fmt, ##__VA_ARGS__) 7 | 8 | namespace stk { 9 | 10 | enum StkLogLevel_t {StkDebug, StkInfo, StkWarning, StkError}; 11 | 12 | extern StkLogLevel_t StkLogLevel; 13 | 14 | void stk_log(StkLogLevel_t level, const char* fmr,...); 15 | 16 | } 17 | 18 | -------------------------------------------------------------------------------- /rawwaves/sine.c: -------------------------------------------------------------------------------- 1 | // Utility to make a rawwave sine table (assumes big-endian machine). 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #define LENGTH 1024 8 | #define PI 3.14159265358979323846 9 | 10 | void main() 11 | { 12 | int i,j; 13 | double temp; 14 | short data[LENGTH + 2]; 15 | FILE *fd; 16 | 17 | fd = fopen("sinewave.raw","wb"); 18 | for (i=0; iprint(buffer_[j] , HEX); 19 | } 20 | } 21 | 22 | }; //stk 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /examples/MemoryLoop/MemoryLoop.ino: -------------------------------------------------------------------------------- 1 | #include "ArdStreamOut.h" 2 | #include "MemoryLoop.h" 3 | 4 | using namespace stk; 5 | 6 | extern const unsigned char sinewave_raw[]; 7 | extern unsigned int sinewave_raw_len; 8 | 9 | MemoryLoop input(Stk::rawwavePath() + "sinewave.raw", sinewave_raw, sinewave_raw_len); 10 | ArdStreamOut output(Serial); 11 | 12 | void setup() { 13 | Serial.begin(115200); 14 | 15 | Stk::setSampleRate( 44100.0 ); 16 | input.setFrequency( 440.0 ); 17 | } 18 | 19 | void loop() { 20 | output.tick( input.tick() ); 21 | } 22 | 23 | -------------------------------------------------------------------------------- /projects/demo/scores/README: -------------------------------------------------------------------------------- 1 | Suggested Score/Instrument Pairings: 2 | 3 | BeeThree bookert.ski, organs.ski 4 | Rhodey doogie.ski 5 | Mandolin duelingb.ski 6 | Bowed muneira.ski, fiddle.ski 7 | PercFlut misacrio.ski 8 | ModalBar morazbel.ski 9 | Brass pictures.ski 10 | Wurley riderson.ski 11 | Flute simplgft.ski 12 | Clarinet simplgft.ski 13 | ModalBar spain.ski 14 | HevyMetl streetsf.ski 15 | Moog thecars.ski 16 | TubeBell tubebell.ski 17 | 18 | FMVoices lacrymos.ski, vocaliz.ski 19 | VoicForm lacrymos.ski, vocaliz.ski 20 | -------------------------------------------------------------------------------- /src/ArdStreamTextOut.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Write the data to the indicated ArdStream interface 3 | */ 4 | 5 | #include "ArdStreamTextOut.h" 6 | #ifdef ARDSERIALBINARYOUT_H 7 | 8 | 9 | namespace stk { 10 | 11 | ArdStreamTextOut::ArdStreamTextOut(Print &stream, unsigned channels) 12 | : ArdStreamOut(stream, channels) { 13 | } 14 | 15 | void ArdStreamTextOut::write(int16_t value) { 16 | for (int j=0;jprint(value); 18 | pStream->print(" "); 19 | } 20 | pStream->println(); 21 | } 22 | 23 | 24 | }; //stk 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /projects/demo/utilities.h: -------------------------------------------------------------------------------- 1 | // Miscellaneous parsing and error functions for use with STK demo program. 2 | // 3 | // Gary P. Scavone, 1999. 4 | 5 | #include "Instrmnt.h" 6 | #include "FileWvOut.h" 7 | #include "Messager.h" 8 | 9 | int voiceByNumber(int number, stk::Instrmnt **instrument); 10 | 11 | int voiceByName(char *name, stk::Instrmnt **instrument); 12 | 13 | void usage(char *function); 14 | 15 | int checkArgs(int numArgs, char *args[]); 16 | 17 | int countVoices(int nArgs, char *args[]); 18 | 19 | bool parseArgs(int numArgs, char *args[], stk::WvOut **output, stk::Messager& messager); 20 | -------------------------------------------------------------------------------- /iOS/demo/iOS Demo/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /examples/MIDI/MidiSerial/MidiSerial.ino: -------------------------------------------------------------------------------- 1 | /** 2 | * @file MidiSerial.ino 3 | * @author Phil Schatzmann 4 | * @brief Example of handling midi input over a serial stream - The sound generation requires arduino-stk 5 | * 6 | * @copyright Copyright (c) 2021 7 | * 8 | */ 9 | #include 10 | #include 11 | #include "ArdStkMidiAction.h" 12 | 13 | ArdI2SOut i2s; 14 | Clarinet clarinet(440); 15 | StkMidiAction action(&clarinet); 16 | MidiStreamIn in(Serial, action); 17 | 18 | void setup() { 19 | Serial.begin(115200); 20 | } 21 | 22 | void loop() { 23 | in.loop(); 24 | i2s.tick( action.tick() ); 25 | } 26 | -------------------------------------------------------------------------------- /examples/UDP/UDP.ino: -------------------------------------------------------------------------------- 1 | 2 | #include "StkAll.h" 3 | 4 | SineWave input; 5 | IPAddress ip(192, 168, 1, 35); 6 | ArdUdp udp(ip, 7000); 7 | ArdStreamBinaryOut output(udp); 8 | const char *SSID = "your ssid"; 9 | const char *PWD = "your password"; 10 | 11 | 12 | void setup() { 13 | Serial.begin(115200); 14 | 15 | WiFi.begin(SSID, PWD); 16 | while (WiFi.status() != WL_CONNECTED) { 17 | Serial.print('.'); 18 | } 19 | 20 | Serial.print("Connected to IP address: "); 21 | Serial.println(WiFi.localIP()); 22 | 23 | Stk::setSampleRate( 44100.0 ); 24 | input.setFrequency( 440.0 ); 25 | } 26 | 27 | void loop() { 28 | output.tick( input.tick() ); 29 | } 30 | -------------------------------------------------------------------------------- /src/ArdCommonOut.cpp: -------------------------------------------------------------------------------- 1 | #include "ArdCommonOut.h" 2 | #ifdef ARDCOMMONOUT_H 3 | 4 | namespace stk { 5 | 6 | ArdCommonOut :: ArdCommonOut( unsigned int nChannels ) 7 | { 8 | this->nChannels = nChannels; 9 | } 10 | 11 | ArdCommonOut :: ~ArdCommonOut() 12 | { 13 | } 14 | 15 | void ArdCommonOut :: tick( const StkFloat sample ) 16 | { 17 | StkFloat out = sample; 18 | write(clipTest(out)); 19 | } 20 | 21 | void ArdCommonOut :: tick( const StkFrames& frames ) 22 | { 23 | unsigned int iFrames = 0; 24 | for ( unsigned int i=0; i 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /library.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Arduino-STK", 3 | "description": "The Synthesis ToolKit in C++ (STK)", 4 | "keywords": "ESP8266, ESP32, MP3, I2S, DAC, Syntheziser, STK, DSP", 5 | "authors": [ 6 | { 7 | "name": "Phil Schatzmann", 8 | "email": "phil.schatzmann@gmail.com", 9 | "url": "https://github.com/pschatzmann/Arduino-STK", 10 | "maintainer": true 11 | } 12 | ], 13 | "repository": { 14 | "type": "git", 15 | "url": "https://github.com/pschatzmann/Arduino-STK" 16 | }, 17 | "version": "1.0.1", 18 | "homepage": "https://github.com/pschatzmann/Arduino-STK", 19 | "dependencies": { 20 | }, 21 | "frameworks": "Arduino", 22 | "examples": [ 23 | "examples/*/*.ino" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /src/ArdStreamTextOut.h: -------------------------------------------------------------------------------- 1 | #include "Stk.h" 2 | #ifdef __STREAMS__ 3 | 4 | #ifndef ARDSERIALBINARYOUT_H 5 | #define ARDSERIALBINARYOUT_H 6 | 7 | #include "WvOut.h" 8 | #include "ArdStreamOut.h" 9 | #include "Print.h" 10 | 11 | namespace stk { 12 | /***************************************************/ 13 | /*! \class stk::ArdStreamTextOut 14 | \brief Output int16 data Arduino Stream 15 | 16 | We are wrting the data as text 17 | 18 | by Phil Schatzmann 19 | */ 20 | /***************************************************/ 21 | class ArdStreamTextOut: public ArdStreamOut { 22 | public: 23 | ArdStreamTextOut(Print &stream, unsigned channels=1); 24 | 25 | protected: 26 | virtual void write(int16_t value) override; 27 | 28 | }; 29 | 30 | }; //stk 31 | #endif 32 | #endif 33 | -------------------------------------------------------------------------------- /iOS/demo/README.md: -------------------------------------------------------------------------------- 1 | ##iOS Demo Xcode project 2 | 3 | This project briefly shows how to manually integrate the STK static library into an Xcode project. See the **README** file in the STK's `iOS` directory for precise instructions. 4 | 5 | Currently, this project does not output sound, it only shows how to generate audio samples from the STK classes within an iOS project, and how to control STK objects via UI controls. These samples need to be fed into an audio engine for them to be heard. 6 | 7 | Note the following: 8 | 9 | * ViewController needs to be renamed with the **.mm** extension as it's importing STK files, which are C++. 10 | * The header search paths in the *Build Settings* of **iOS Demo.xcodeproj** point to `../../include/` because the STK's `include` directory is two directories up relative to it. 11 | -------------------------------------------------------------------------------- /src/ArdStkLogger.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "ArdStkLogger.h" 5 | 6 | 7 | namespace stk { 8 | 9 | // global actual loggin level for application 10 | StkLogLevel_t StkLogLevel; 11 | 12 | // Error level as string 13 | const char* midi_log_msg[] = {"Debug", "Info", "Warning", "Error"}; 14 | 15 | /// Print log message 16 | void stk_log(StkLogLevel_t level, const char* fmt ...) { 17 | if (StkLogLevel <= level) { // AUDIOKIT_LOG_LEVEL = Debug 18 | char log_buffer[200]; 19 | strcpy(log_buffer,midi_log_msg[level] ); 20 | strcat(log_buffer,": "); 21 | va_list arg; 22 | va_start(arg, fmt); 23 | vsprintf(log_buffer+9, fmt, arg); 24 | va_end(arg); 25 | strcat(log_buffer, "\n"); 26 | printf("%s",log_buffer); 27 | } 28 | } 29 | 30 | } -------------------------------------------------------------------------------- /examples/OutToBluetooth/OutToBluetooth.ino: -------------------------------------------------------------------------------- 1 | 2 | // install https://github.com/pschatzmann/ESP32-A2DP 3 | // and activate __BT_A2DP__ in ArdConfig.h 4 | #include "StkAll.h" 5 | 6 | Clarinet clarinet(440); 7 | Voicer voicer; 8 | ArdBtSource bt; 9 | StkFloat note = 64; // 0 to 128 10 | StkFloat amplitude = 100; // 0 to 128 11 | 12 | void setup() { 13 | Serial.begin(115200); 14 | 15 | Stk::setSampleRate( 44100.0 ); 16 | voicer.addInstrument(&clarinet); 17 | 18 | bt.start("RadioPlayer", voicer); 19 | } 20 | 21 | void loop() { 22 | if (bt.is_connected()) { 23 | Serial.print("playing "); 24 | Serial.println(++note); 25 | 26 | voicer.noteOn( note, amplitude ); 27 | delay(900); 28 | voicer.noteOff( note, 20 ); 29 | delay(200); 30 | if (note>=90) { 31 | note = 30; 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /iOS/demo/iOS DemoTests/iOS_DemoTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // iOS_DemoTests.m 3 | // iOS DemoTests 4 | // 5 | // Created by Ariel Elkin on 03/03/2014. 6 | // Copyright (c) 2014 Ariel Elkin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface iOS_DemoTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation iOS_DemoTests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /src/Noise.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************/ 2 | /*! \class Noise 3 | \brief STK noise generator. 4 | 5 | Generic random number generation using the 6 | C rand() function. The quality of the rand() 7 | function varies from one OS to another. 8 | 9 | by Perry R. Cook and Gary P. Scavone, 1995--2019. 10 | */ 11 | /***************************************************/ 12 | 13 | #include "Noise.h" 14 | #include 15 | 16 | namespace stk { 17 | 18 | Noise :: Noise( unsigned int seed ) 19 | { 20 | // Seed the random number generator 21 | this->setSeed( seed ); 22 | } 23 | 24 | void Noise :: setSeed( unsigned int seed ) 25 | { 26 | if ( seed == 0 ) 27 | srand( (unsigned int) time( NULL ) ); 28 | else 29 | srand( seed ); 30 | } 31 | 32 | } // stk namespace 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/ArdStreamHexOut.h: -------------------------------------------------------------------------------- 1 | #include "Stk.h" 2 | #ifdef __STREAMS__ 3 | 4 | #ifndef STK_ArdStream_HEX_OUT_H 5 | #define STK_ArdStream_HEX_OUT_H 6 | 7 | #include "ArdStreamOut.h" 8 | #include "Print.h" 9 | 10 | namespace stk { 11 | /***************************************************/ 12 | /*! \class stk::ArdStreamHexOut 13 | \brief Output int32 data to Arduiono HardwareArdStream 14 | 15 | We are wrting the data to the indicated Ardino HardwareArdStream device. 16 | We convert the output to hex text 17 | 18 | by Phil Schatzmann 19 | 20 | */ 21 | /***************************************************/ 22 | class ArdStreamHexOut: public ArdStreamOut { 23 | public: 24 | ArdStreamHexOut(Print &stream,unsigned channels=1); 25 | protected: 26 | virtual void write(int16_t value) override; 27 | 28 | }; 29 | 30 | }; //stk 31 | #endif 32 | #endif 33 | -------------------------------------------------------------------------------- /projects/demo/scores/tubebell.ski: -------------------------------------------------------------------------------- 1 | /* Howdy!! ToolKit96cpp SKINI File, Perry Cook */ 2 | NoteOn 0.000000 1 65 63.500000 3 | NoteOn 0.200000 1 73 101.600002 4 | NoteOn 0.200000 1 65 76.200003 5 | NoteOn 0.200000 1 75 114.299997 6 | NoteOn 0.200000 1 65 63.500000 7 | NoteOn 0.200000 1 72 76.200003 8 | NoteOn 0.200000 1 73 114.299997 9 | NoteOn 0.200000 1 65 50.800001 10 | NoteOn 0.200000 1 72 114.299997 11 | NoteOn 0.200000 1 65 63.500000 12 | NoteOn 0.200000 1 70 114.299997 13 | NoteOn 0.200000 1 65 50.800001 14 | NoteOn 0.200000 1 85 127.000000 15 | NoteOn 0.200000 1 65 76.200003 16 | NoteOn 0.200000 1 80 76.200003 17 | NoteOn 0.200000 1 46 127.000000 18 | ControlChange 0.000000 1 1 120.000000 19 | NoteOff 2.000000 1 46 63.500000 20 | -------------------------------------------------------------------------------- /projects/eguitar/scores/test.ski: -------------------------------------------------------------------------------- 1 | /* Howdy!! SKINI File, Perry Cook */ 2 | NoteOn 0.1 0 40 100.000000 3 | NoteOn 0.01 0 44 100.000000 4 | NoteOn 0.01 0 47 100.000000 5 | NoteOn 0.01 0 52 100.000000 6 | NoteOff 1.0 0 40 64.000000 7 | NoteOff 0.0 0 44 64.000000 8 | NoteOff 0.0 0 47 64.000000 9 | NoteOff 0.0 0 52 64.000000 10 | 11 | NoteOn 0.3 0 39 100.000000 12 | NoteOn 0.01 0 42 100.000000 13 | NoteOn 0.01 0 47 100.000000 14 | NoteOn 0.01 0 51 100.000000 15 | NoteOff 1.0 0 39 64.000000 16 | NoteOff 0.0 0 42 64.000000 17 | NoteOff 0.0 0 47 64.000000 18 | NoteOff 0.0 0 51 64.000000 19 | 20 | NoteOn 0.3 0 40 100.000000 21 | NoteOn 0.01 0 44 100.000000 22 | NoteOn 0.01 0 47 100.000000 23 | NoteOn 0.01 0 52 100.000000 24 | NoteOff 2.0 0 40 64.000000 25 | NoteOff 0.0 0 44 64.000000 26 | NoteOff 0.0 0 47 64.000000 27 | NoteOff 0.0 0 52 64.000000 -------------------------------------------------------------------------------- /projects/demo/scores/spain.ski: -------------------------------------------------------------------------------- 1 | /* Howdy!! ToolKit96cpp SKINI File, Perry Cook */ 2 | NoteOn 0.000000 1 48 88.899998 3 | NoteOff 0.416009 1 48 63.500000 4 | NoteOn 0.104036 1 53 101.600002 5 | NoteOff 0.312018 1 53 63.500000 6 | NoteOn 0.078005 1 56 63.500000 7 | NoteOn 0.130023 1 55 101.600002 8 | NoteOn 0.260000 1 51 76.200003 9 | NoteOn 0.130023 1 48 38.100002 10 | NoteOn 0.130023 1 53 101.600002 11 | NoteOn 0.520000 1 58 127.000000 12 | NoteOff 0.312018 1 58 63.500000 13 | NoteOn 0.078005 1 63 76.200003 14 | NoteOn 0.130023 1 62 114.299997 15 | NoteOff 0.416009 1 62 63.500000 16 | NoteOn 0.104036 1 58 127.000000 17 | NoteOn 0.130023 1 60 50.800001 18 | NoteOn 0.260000 1 56 88.899998 19 | NoteOn 0.260000 1 56 63.500000 20 | NoteOn 0.130023 1 63 76.200003 21 | NoteOn 0.260000 1 41 127.000000 22 | ControlChange 0.000000 1 1 127.000000 23 | NoteOff 1.950023 1 41 63.500000 24 | -------------------------------------------------------------------------------- /rawwaves/makemidi.c: -------------------------------------------------------------------------------- 1 | /**********************************************/ 2 | /** Utility to make various functions **/ 3 | /** like exponential and log gain curves. **/ 4 | /** Specifically for direct MIDI parameter **/ 5 | /** conversions. **/ 6 | /** Included here: **/ 7 | /** A440 Referenced Equal Tempered Pitches **/ 8 | /** as a function of MIDI note number. **/ 9 | /** **/ 10 | /**********************************************/ 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | void main() 17 | { 18 | int i,j; 19 | double temp; 20 | double data[128]; 21 | 22 | /********* Pitch as fn. of MIDI Note **********/ 23 | 24 | printf("double __MIDI_To_Pitch[128] = {"); 25 | for (i=0;i<128;i++) { 26 | if (i%8 == 0) printf("\n"); 27 | temp = 220.0 * pow(2.0,((double) i - 57) / 12.0); 28 | printf("%.2lf,",temp); 29 | } 30 | printf("};\n"); 31 | exit(1); 32 | } 33 | 34 | -------------------------------------------------------------------------------- /src/ArdStreamOut.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Write the data to the indicated ArdStream interface 3 | */ 4 | 5 | #include "ArdStreamOut.h" 6 | #ifdef ARDSTREAMOUTCOMMON_H 7 | 8 | namespace stk { 9 | 10 | ArdStreamOut::ArdStreamOut(Print &stream, unsigned channels) 11 | : ArdCommonOut(channels) { 12 | this->pStream = &stream; 13 | this->byteCount = sizeof(int16_t)*nChannels; 14 | } 15 | 16 | ArdStreamOut::ArdStreamOut(Print *stream, unsigned channels) 17 | : ArdCommonOut(channels) { 18 | this->pStream = stream; 19 | this->byteCount = sizeof(int16_t)*nChannels; 20 | } 21 | 22 | // convert sample to int16 23 | void ArdStreamOut::write(StkFloat value) { 24 | write(static_cast(value*32766)); 25 | } 26 | 27 | // output to stream in request number of channels 28 | void ArdStreamOut::write(int16_t value) { 29 | int16_t buffer[nChannels]; 30 | for (int j=0;jpStream->write((const char *)buffer, byteCount); 34 | }; 35 | 36 | 37 | }; //stk 38 | 39 | #endif 40 | 41 | -------------------------------------------------------------------------------- /projects/ragamatic/README-raga.txt: -------------------------------------------------------------------------------- 1 | This is RagaMatic (tm) by Perry Cook. 2 | It was written for Ken Steiglitz's birthday in 1999. 3 | 4 | Sitar and Drones are physical models. 5 | Vocalize drums and Tabla drums are samples. 6 | 7 | In the RagaMatic directory, type: 8 | 9 | > make 10 | 11 | to compile and then 12 | 13 | > Raga.bat 14 | 15 | to have fun and achieve inner peace. 16 | 17 | If you ask me, I think this band needs a flute player too. If you 18 | like, team up and see if you can add the flute model to the project. 19 | This requires adding a few files to the Makefile, a few lines to the 20 | ragamat.cpp file (including how the flute player should play, etc.), 21 | and another slider to the TCL script to control the flute's 22 | contributions. This might only run on the fastest machines once 23 | you've added the flute. 24 | 25 | Since latency isn't much of an issue in raga-land, you might bump up 26 | the RT_BUFFER_SIZE in Stk.h to something around 1024, depending on the 27 | speed of your machine. 28 | 29 | All is Bliss... 30 | All is Bliss... 31 | -------------------------------------------------------------------------------- /src/ArdUdp.h: -------------------------------------------------------------------------------- 1 | #include "ArdConfig.h" 2 | #ifdef ESP32 3 | 4 | #ifndef ARDUPD_H 5 | #define ARDUPD_H 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | namespace stk { 12 | 13 | /***************************************************/ 14 | /*! \class stk::ArdUdp 15 | \brief Simple UDP wrapper class which sends all 16 | packages to the same destination. 17 | 18 | This is useful when the API asks for a stream 19 | as parameter to output data. 20 | 21 | by Phil Schatzmann 22 | 23 | */ 24 | /***************************************************/ 25 | 26 | class ArdUdp : public WiFiUDP { // EthernetUDP { 27 | public: 28 | ArdUdp(char* targetUdpAddressStr,int targetPort); 29 | ArdUdp(IPAddress targetUdpAddress,int targetPort); 30 | size_t write(const uint8_t * buffer,size_t size ); 31 | bool isValidHost(); 32 | 33 | protected: 34 | IPAddress targetUdpAddress; 35 | int targetPort; 36 | bool isValidHostFlag; 37 | }; 38 | 39 | } 40 | 41 | #endif 42 | #endif -------------------------------------------------------------------------------- /src/Function.h: -------------------------------------------------------------------------------- 1 | #ifndef STK_FUNCTION_H 2 | #define STK_FUNCTION_H 3 | 4 | #include "Stk.h" 5 | 6 | namespace stk { 7 | 8 | /***************************************************/ 9 | /*! \class stk::Function 10 | \brief STK abstract function parent class. 11 | 12 | This class provides common functionality for STK classes that 13 | implement tables or other types of input to output function 14 | mappings. 15 | 16 | by Perry R. Cook and Gary P. Scavone, 1995--2019. 17 | */ 18 | /***************************************************/ 19 | 20 | class Function : public Stk 21 | { 22 | public: 23 | //! Class constructor. 24 | Function( void ) { lastFrame_.resize( 1, 1, 0.0 ); }; 25 | 26 | //! Return the last computed output sample. 27 | StkFloat lastOut( void ) const { return lastFrame_[0]; }; 28 | 29 | //! Take one sample input and compute one sample of output. 30 | virtual StkFloat tick( StkFloat input ) = 0; 31 | 32 | protected: 33 | 34 | StkFrames lastFrame_; 35 | 36 | }; 37 | 38 | } // stk namespace 39 | 40 | #endif 41 | 42 | -------------------------------------------------------------------------------- /examples/Instrument/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | 3 | # set the project name 4 | project(Instrument) 5 | set (CMAKE_CXX_STANDARD 11) 6 | set (DCMAKE_CXX_FLAGS "-Werror") 7 | 8 | include(FetchContent) 9 | option(BUILD_SHARED_LIBS "Build using shared libraries" OFF) 10 | 11 | # Build with arduino-audio-tools 12 | if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) 13 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../.. ${CMAKE_CURRENT_BINARY_DIR}/arduino-stk ) 14 | endif() 15 | 16 | # build sketch as executable 17 | set_source_files_properties(Instrument.ino PROPERTIES LANGUAGE CXX) 18 | add_executable (Instrument Instrument.ino) 19 | 20 | 21 | # set preprocessor defines 22 | target_compile_definitions(arduino_emulator PUBLIC -DDEFINE_MAIN) 23 | target_compile_definitions(Instrument PUBLIC -DARDUINO -DIS_DESKTOP -DEXIT_ON_STOP) 24 | 25 | # OS/X might need this setting for core audio 26 | #target_compile_definitions(portaudio PUBLIC -DPA_USE_COREAUDIO=1) 27 | 28 | # specify libraries 29 | target_link_libraries(Instrument arduino_stk arduino_emulator) 30 | -------------------------------------------------------------------------------- /examples/MIDI/AppleMidi/AppleMidi.ino: -------------------------------------------------------------------------------- 1 | /** 2 | * @file AppleMidi.ino 3 | * @author Phil Schatzmann 4 | * @brief Example of handling midi input with Apple Midi - The sound generation requires arduino-stk 5 | * 6 | * @copyright Copyright (c) 2021 7 | * 8 | */ 9 | #include 10 | #include 11 | #include "ArdStkMidiAction.h" 12 | 13 | ArdI2SOut i2s; 14 | Clarinet clarinet(440); 15 | StkMidiAction action(&clarinet); 16 | AppleMidiServer apple(&action); 17 | const char *SSID = "your ssid"; 18 | const char *PWD = "your password"; 19 | 20 | void setupWIFI() { 21 | Serial.begin(119200); 22 | MidiLogLevel = MidiInfo; 23 | 24 | WiFi.begin(SSID, PWD); 25 | while (WiFi.status() != WL_CONNECTED) { 26 | Serial.print('.'); 27 | delay(1000); 28 | } 29 | 30 | Serial.print("Connected to IP address: "); 31 | Serial.println(WiFi.localIP()); 32 | } 33 | 34 | void setup() { 35 | Serial.begin(115200); 36 | setupWIFI(); 37 | apple.begin(5004); 38 | } 39 | 40 | void loop() { 41 | if (!apple.loop()){ 42 | delay(10); 43 | } 44 | i2s.tick( action.tick() ); 45 | } -------------------------------------------------------------------------------- /examples/InstrumentToI2S/InstrumentToI2S.ino: -------------------------------------------------------------------------------- 1 | #include "StkAll.h" 2 | 3 | I2SStream i2s; 4 | 5 | Clarinet clarinet(440); 6 | Voicer voicer; 7 | int note = 50; // starting midi note 8 | int group = 0; 9 | float amplitude = 64; 10 | 11 | void setup() { 12 | Serial.begin(115200); 13 | voicer.addInstrument(&clarinet, group); 14 | 15 | i2s_pin_config_t my_pin_config = { 16 | .bck_io_num = 26, 17 | .ws_io_num = 25, 18 | .data_out_num = 22, 19 | .data_in_num = I2S_PIN_NO_CHANGE 20 | }; 21 | 22 | output.setPinConfig(my_pin_config); 23 | output.begin(); 24 | } 25 | 26 | 27 | void loop() { 28 | note += rand() % 10 - 5; // generate some random offset 29 | Serial.println(note); 30 | 31 | // play note 32 | voicer.noteOn( note, amplitude, group); 33 | long endTime = millis()+1000; 34 | while (millis() 6 | 7 | using namespace stk; 8 | 9 | int main() 10 | { 11 | // Set the global sample rate before creating class instances. 12 | Stk::setSampleRate( 44100.0 ); 13 | 14 | int i; 15 | FileWvOut output; 16 | SineWave inputs[4]; 17 | 18 | // Set the sine wave frequencies. 19 | for ( i=0; i<4; i++ ) 20 | inputs[i].setFrequency( 220.0 * (i+1) ); 21 | 22 | // Define and open a 16-bit, four-channel AIFF formatted output file 23 | try { 24 | output.openFile( "foursine.aif", 4, FileWrite::FILE_AIF, Stk::STK_SINT16 ); 25 | } 26 | catch (StkError &) { 27 | exit( 1 ); 28 | } 29 | 30 | // Write two seconds of four sines to the output file 31 | StkFrames frames( 88200, 4 ); 32 | for ( i=0; i<4; i++ ) 33 | inputs[i].tick( frames, i ); 34 | 35 | output.tick( frames ); 36 | 37 | // Now write the first sine to all four channels for two seconds 38 | for ( i=0; i<88200; i++ ) { 39 | output.tick( inputs[0].tick() ); 40 | } 41 | 42 | return 0; 43 | } 44 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.16) 2 | 3 | # set the project name 4 | project(arduino-stk) 5 | 6 | # lots of warnings and all warnings as errors 7 | # add_compile_options(-Wall -Wextra ) 8 | set(CMAKE_CXX_STANDARD 17) 9 | 10 | include(FetchContent) 11 | 12 | # Build with Linux Arduino Emulator 13 | FetchContent_Declare(arduino_emulator GIT_REPOSITORY "https://github.com/pschatzmann/Arduino-Emulator.git" GIT_TAG main ) 14 | FetchContent_GetProperties(arduino_emulator) 15 | if(NOT arduino_emulator_POPULATED) 16 | FetchContent_Populate(arduino_emulator) 17 | add_subdirectory(${arduino_emulator_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/arduino_emulator) 18 | endif() 19 | 20 | # define source files 21 | file(GLOB_RECURSE SRC_LIST_CPP CONFIGURE_DEPENDS "${PROJECT_SOURCE_DIR}/src/*.cpp" ) 22 | 23 | # define libraries 24 | add_library (arduino-stk ${SRC_LIST_CPP}) 25 | 26 | target_compile_definitions(arduino-stk PUBLIC -DIS_DESKTOP ) 27 | 28 | # define location for header files 29 | target_include_directories(arduino-stk PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src ) 30 | 31 | target_link_libraries(arduino-stk arduino_emulator) 32 | -------------------------------------------------------------------------------- /projects/demo/demo.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27428.2011 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo", "demo.vcxproj", "{9EB1E236-C8B6-4AB8-B037-1222FE183ABE}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x86 = Debug|x86 11 | Release|x86 = Release|x86 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {9EB1E236-C8B6-4AB8-B037-1222FE183ABE}.Debug|x86.ActiveCfg = Debug|Win32 15 | {9EB1E236-C8B6-4AB8-B037-1222FE183ABE}.Debug|x86.Build.0 = Debug|Win32 16 | {9EB1E236-C8B6-4AB8-B037-1222FE183ABE}.Release|x86.ActiveCfg = Release|Win32 17 | {9EB1E236-C8B6-4AB8-B037-1222FE183ABE}.Release|x86.Build.0 = Release|Win32 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {D42DE6A6-2EBC-4622-9BB2-79E09E47156D} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /projects/effects/README-effects.txt: -------------------------------------------------------------------------------- 1 | The Synthesis ToolKit in C++ (STK) 2 | 3 | By Perry R. Cook and Gary P. Scavone, 1995--2019. 4 | 5 | EFFECTS PROJECT: 6 | 7 | This directory contains a program that demonstrates realtime duplex 8 | mode (simultaneous audio input and output) operation, as well as 9 | several simple delay-line based effects algorithms. Duplex mode 10 | operation is very hardware dependent. If you have trouble with this 11 | application, make sure your soundcard supports the desired sample rate 12 | and sample size (16-bit). 13 | 14 | NOTES: 15 | 16 | 1. This project will not run under WindowsNT or NeXTStep, due to lack 17 | of realtime audio input support. However, it should run under 18 | other flavors of Windows. 19 | 20 | 2. Audio input from either a microphone or line-input device MUST be 21 | available to the audio input port when the program is started. 22 | 23 | 3. Latency can be controlled using the nBufferFrames argument to the 24 | RtAudio openStream() function. The default settings in effects.cpp 25 | are relatively high because some Windows soundcard drivers crash if 26 | the settings are too low. 27 | -------------------------------------------------------------------------------- /examples/InstrumentToAudioToolsI2S/InstrumentToAudioToolsI2S.ino: -------------------------------------------------------------------------------- 1 | #include "AudioTools.h" 2 | #include "StkAll.h" 3 | 4 | I2SStream i2s; 5 | ArdStreamOut output(i2s, 1); 6 | Clarinet clarinet(440); 7 | Voicer voicer; 8 | int note = 50; // starting midi note 9 | int group = 0; 10 | float amplitude = 64; 11 | 12 | void setup() { 13 | Serial.begin(115200); 14 | 15 | voicer.addInstrument(&clarinet, group); 16 | 17 | auto cfg = i2s.defaultConfig(TX_MODE); 18 | cfg.bits_per_sample = 16; 19 | cfg.sample_rate = Stk::sampleRate(); 20 | cfg.channels = 1; 21 | cfg.pin_bck = 26; 22 | cfg.pin_ws = 25; 23 | cfg.pin_data = 22; 24 | i2s.begin(cfg); 25 | } 26 | 27 | 28 | void loop() { 29 | note += rand() % 10 - 5; // generate some random offset 30 | Serial.println(note); 31 | 32 | // play note 33 | voicer.noteOn( note, amplitude, group); 34 | long endTime = millis()+1000; 35 | while (millis() 6 | 7 | using namespace stk; 8 | 9 | int main() 10 | { 11 | // Set the global sample rate before creating class instances. 12 | Stk::setSampleRate( 44100.0 ); 13 | Stk::showWarnings( true ); 14 | 15 | int nFrames = 100000; 16 | SineWave sine; 17 | RtWvOut *dac = 0; 18 | 19 | try { 20 | // Define and open the default realtime output device for one-channel playback 21 | dac = new RtWvOut( 1 ); 22 | } 23 | catch ( StkError & ) { 24 | exit( 1 ); 25 | } 26 | 27 | sine.setFrequency( 441.0 ); 28 | 29 | // Option 1: Use StkFrames 30 | /* 31 | StkFrames frames( nFrames, 1 ); 32 | try { 33 | dac->tick( sine.tick( frames ) ); 34 | } 35 | catch ( StkError & ) { 36 | goto cleanup; 37 | } 38 | */ 39 | 40 | // Option 2: Single-sample computations 41 | for ( int i=0; itick( sine.tick() ); 44 | } 45 | catch ( StkError & ) { 46 | goto cleanup; 47 | } 48 | } 49 | 50 | cleanup: 51 | delete dac; 52 | 53 | return 0; 54 | } 55 | -------------------------------------------------------------------------------- /src/ArdStreamOut.h: -------------------------------------------------------------------------------- 1 | #include "Stk.h" 2 | #ifdef __STREAMS__ 3 | 4 | #ifndef ARDSTREAMOUTCOMMON_H 5 | #define ARDSTREAMOUTCOMMON_H 6 | 7 | #include "ArdConfig.h" 8 | #include "WvOut.h" 9 | #include "ArdCommonOut.h" 10 | #include "Print.h" 11 | 12 | namespace stk { 13 | /***************************************************/ 14 | /*! \class stk::ArdStreamOut 15 | \brief Abstract class for Output to Arduiono HardwareArdStream 16 | 17 | We are wrting the data to the indicated Ardino HardwareArdStream device. 18 | If the channel is >1 we repeat the output multiple times until all 19 | channels have been filled (with the same output value) 20 | 21 | by Phil Schatzmann 22 | 23 | */ 24 | /***************************************************/ 25 | class ArdStreamOut: public ArdCommonOut { 26 | public: 27 | ArdStreamOut(Print &stream, unsigned channels=1); 28 | ArdStreamOut(Print *stream, unsigned channels=1); 29 | 30 | protected: 31 | Print* pStream; 32 | int byteCount; 33 | 34 | virtual void write(StkFloat value) override; 35 | virtual void write(int16_t value) override; 36 | 37 | }; 38 | 39 | }; //stk 40 | #endif 41 | #endif 42 | -------------------------------------------------------------------------------- /Makefile.in: -------------------------------------------------------------------------------- 1 | ### Do not edit -- Generated by 'configure --with-whatever' from Makefile.in 2 | 3 | RM = /bin/rm 4 | 5 | REALTIME = @realtime@ 6 | 7 | all : 8 | cd src && $(MAKE) 9 | cd projects/demo && $(MAKE) libdemo 10 | ifeq ($(REALTIME),yes) 11 | cd projects/effects && $(MAKE) libeffects 12 | cd projects/ragamatic && $(MAKE) libragamat 13 | cd projects/eguitar && $(MAKE) libeguitar 14 | endif 15 | cd projects/examples && $(MAKE) -f libMakefile 16 | 17 | clean : 18 | $(RM) -f *~ 19 | cd src && $(MAKE) clean 20 | cd projects/demo && $(MAKE) clean 21 | ifeq ($(REALTIME),yes) 22 | cd projects/effects && $(MAKE) clean 23 | cd projects/ragamatic && $(MAKE) clean 24 | cd projects/eguitar && $(MAKE) clean 25 | endif 26 | cd projects/examples && $(MAKE) clean 27 | 28 | distclean: clean 29 | $(RM) -rf config.log config.status autom4te.cache Makefile 30 | cd src && $(MAKE) distclean 31 | cd projects/demo && $(MAKE) distclean 32 | ifeq ($(REALTIME),yes) 33 | cd projects/effects && $(MAKE) distclean 34 | cd projects/ragamatic && $(MAKE) distclean 35 | cd projects/eguitar && $(MAKE) distclean 36 | endif 37 | cd projects/examples && $(MAKE) distclean 38 | 39 | install: 40 | $(MAKE) -C src install 41 | 42 | -------------------------------------------------------------------------------- /projects/examples/sineosc.cpp: -------------------------------------------------------------------------------- 1 | // sineosc.cpp STK tutorial program 2 | 3 | #include "FileLoop.h" 4 | #include "FileWvOut.h" 5 | #include 6 | 7 | using namespace stk; 8 | 9 | int main() 10 | { 11 | // Set the global sample rate before creating class instances. 12 | Stk::setSampleRate( 44100.0 ); 13 | 14 | int nFrames = 100000; 15 | FileLoop input; 16 | FileWvOut output; 17 | 18 | try { 19 | // Load the sine wave file. 20 | input.openFile( "rawwaves/sinewave.raw", true ); 21 | 22 | // Open a 16-bit, one-channel WAV formatted output file 23 | output.openFile( "hellosine.wav", 1, FileWrite::FILE_WAV, Stk::STK_SINT16 ); 24 | } 25 | catch ( StkError & ) { 26 | exit( 1 ); 27 | } 28 | 29 | input.setFrequency( 440.0 ); 30 | 31 | // Option 1: Use StkFrames 32 | /* 33 | StkFrames frames( nFrames, 1 ); 34 | try { 35 | output.tick( input.tick( frames ) ); 36 | } 37 | catch ( StkError & ) { 38 | exit( 1 ); 39 | } 40 | */ 41 | 42 | // Option 2: Single-sample computations 43 | for ( int i=0; i 2 | 3 | 4 | 5 | {b2d176c7-f0d4-4c01-b70a-d94511c8dddb} 6 | cpp;c;cxx;rc;def;r;odl;idl;hpj;bat 7 | 8 | 9 | {dbc5af6a-0082-41ec-b9a4-81be71941424} 10 | h;hpp;hxx;hm;inl 11 | 12 | 13 | {6a2afe32-1d81-4bdb-91df-ad55434bc978} 14 | ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | 26 | 27 | Header Files 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/OneZero.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************/ 2 | /*! \class OneZero 3 | \brief STK one-zero filter class. 4 | 5 | This class implements a one-zero digital filter. A method is 6 | provided for setting the zero position along the real axis of the 7 | z-plane while maintaining a constant filter gain. 8 | 9 | by Perry R. Cook and Gary P. Scavone, 1995--2019. 10 | */ 11 | /***************************************************/ 12 | 13 | #include "OneZero.h" 14 | #include 15 | 16 | namespace stk { 17 | 18 | OneZero :: OneZero( StkFloat theZero ) 19 | { 20 | b_.resize( 2 ); 21 | inputs_.resize( 2, 1, 0.0 ); 22 | 23 | this->setZero( theZero ); 24 | } 25 | 26 | OneZero :: ~OneZero( void ) 27 | { 28 | } 29 | 30 | void OneZero :: setZero( StkFloat theZero ) 31 | { 32 | // Normalize coefficients for unity gain. 33 | if ( theZero > 0.0f ) 34 | b_[0] = 1.0f / ((StkFloat) 1.0f + theZero); 35 | else 36 | b_[0] = 1.0f / ((StkFloat) 1.0f - theZero); 37 | 38 | b_[1] = -theZero * b_[0]; 39 | } 40 | 41 | void OneZero :: setCoefficients( StkFloat b0, StkFloat b1, bool clearState ) 42 | { 43 | b_[0] = b0; 44 | b_[1] = b1; 45 | 46 | if ( clearState ) this->clear(); 47 | } 48 | 49 | } // stk namespace 50 | -------------------------------------------------------------------------------- /src/Modulate.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************/ 2 | /*! \class Modulate 3 | \brief STK periodic/random modulator. 4 | 5 | This class combines random and periodic 6 | modulations to give a nice, natural human 7 | modulation function. 8 | 9 | by Perry R. Cook and Gary P. Scavone, 1995--2019. 10 | */ 11 | /***************************************************/ 12 | 13 | #include "Modulate.h" 14 | 15 | namespace stk { 16 | 17 | Modulate :: Modulate( void ) 18 | { 19 | vibrato_.setFrequency( 6.0 ); 20 | vibratoGain_ = 0.04; 21 | 22 | noiseRate_ = (unsigned int) ( 330.0f * Stk::sampleRate() / 22050.0f ); 23 | noiseCounter_ = noiseRate_; 24 | 25 | randomGain_ = 0.05; 26 | filter_.setPole( 0.999 ); 27 | filter_.setGain( randomGain_ ); 28 | 29 | Stk::addSampleRateAlert( this ); 30 | } 31 | 32 | Modulate :: ~Modulate( void ) 33 | { 34 | Stk::removeSampleRateAlert( this ); 35 | } 36 | 37 | void Modulate :: sampleRateChanged( StkFloat newRate, StkFloat oldRate ) 38 | { 39 | if ( !ignoreSampleRateChange_ ) 40 | noiseRate_ = (unsigned int ) ( newRate * noiseRate_ / oldRate ); 41 | } 42 | 43 | void Modulate :: setRandomGain( StkFloat gain ) 44 | { 45 | randomGain_ = gain; 46 | filter_.setGain( randomGain_ ); 47 | } 48 | 49 | } // stk namespace 50 | -------------------------------------------------------------------------------- /src/raw/zz-raw-eee.cpp: -------------------------------------------------------------------------------- 1 | #include "all.h" 2 | const unsigned char eee_raw[] PROGMEM = { 3 | 0xfe, 0x31, 0x02, 0xea, 0x01, 0x29, 0x07, 0x08, 0x10, 0x40, 0x0f, 0x26, 4 | 0x0e, 0x3d, 0x14, 0x51, 0x12, 0xc1, 0x11, 0x23, 0x17, 0x3d, 0x16, 0x1d, 5 | 0x11, 0x95, 0x11, 0x4d, 0x0f, 0xbd, 0x0d, 0xa6, 0x0d, 0x3e, 0x09, 0xc3, 6 | 0x05, 0x25, 0x03, 0xca, 0xff, 0x70, 0xfa, 0xc9, 0xfa, 0x33, 0xf7, 0xa2, 7 | 0xf4, 0xf9, 0xf4, 0x4e, 0xf1, 0xc3, 0xee, 0x82, 0xee, 0x24, 0xee, 0xce, 8 | 0xed, 0x43, 0xea, 0x5d, 0xe9, 0x17, 0xec, 0x4b, 0xeb, 0xc3, 0xe6, 0x21, 9 | 0xeb, 0x21, 0xf4, 0x7f, 0xee, 0xc3, 0xea, 0x0e, 0xf7, 0xf6, 0xfd, 0x8b, 10 | 0xf4, 0x03, 0xfb, 0xbe, 0x0b, 0x41, 0x03, 0xd8, 0xfe, 0xbf, 0x11, 0x46, 11 | 0x17, 0x00, 0x0a, 0xaa, 0x10, 0x7d, 0x1d, 0x4c, 0x15, 0xd1, 0x11, 0x63, 12 | 0x1c, 0xdd, 0x1d, 0x1d, 0x14, 0x50, 0x15, 0xcd, 0x18, 0x5d, 0x13, 0x86, 13 | 0x10, 0x9e, 0x0e, 0xb6, 0x0a, 0xad, 0x08, 0xca, 0x03, 0x69, 0xfc, 0xf8, 14 | 0xfc, 0xeb, 0xf8, 0x32, 0xea, 0xd6, 0xe6, 0x6d, 0xeb, 0x03, 0xe5, 0x72, 15 | 0xdc, 0xb4, 0xe1, 0x1a, 0xe1, 0xa3, 0xd5, 0x16, 0xd5, 0x76, 0xe2, 0x36, 16 | 0xde, 0xa3, 0xd4, 0xd7, 0xdc, 0xda, 0xe3, 0x7e, 0xde, 0xa3, 0xe3, 0xe7, 17 | 0xec, 0xb1, 0xeb, 0x73, 0xeb, 0xc3, 0xf3, 0xd5, 0xfb, 0x2f, 0xfd, 0x83, 18 | 0xfe, 0x77, 0xfe, 0x31 19 | }; 20 | unsigned int eee_raw_len = 184; 21 | -------------------------------------------------------------------------------- /src/raw/zz-raw-ooo.cpp: -------------------------------------------------------------------------------- 1 | #include "all.h" 2 | const unsigned char ooo_raw[] PROGMEM = { 3 | 0xff, 0x61, 0x01, 0xdc, 0xff, 0x2e, 0xfc, 0x64, 0xfd, 0x1b, 0xfd, 0xb3, 4 | 0xfc, 0x9d, 0xfb, 0xcc, 0xfb, 0x3b, 0xfa, 0xb5, 0xfb, 0xca, 0xfd, 0x3b, 5 | 0xfc, 0x5b, 0xfa, 0x08, 0xf9, 0x2f, 0xfa, 0xff, 0xfc, 0x5b, 0xf9, 0xf7, 6 | 0xf6, 0xd5, 0xf7, 0x54, 0xf6, 0xd3, 0xed, 0xe8, 0xe1, 0x49, 0xdd, 0x4b, 7 | 0xe4, 0xa3, 0xea, 0x42, 0xe5, 0x3c, 0xe5, 0x41, 0xfa, 0xab, 0x12, 0x44, 8 | 0x12, 0x0b, 0x0b, 0x72, 0x19, 0xdd, 0x2c, 0x37, 0x27, 0x4d, 0x18, 0xe9, 9 | 0x17, 0x3d, 0x1d, 0xf7, 0x21, 0x01, 0x18, 0xdf, 0x0b, 0xfd, 0x0c, 0xcd, 10 | 0x17, 0x71, 0x11, 0xe6, 0xfc, 0x8b, 0xf3, 0x14, 0xf6, 0x97, 0xee, 0x7a, 11 | 0xdb, 0xa3, 0xd1, 0xd4, 0xd1, 0x6f, 0xd3, 0x71, 0xd5, 0xa3, 0xd5, 0x85, 12 | 0xd8, 0x2e, 0xe2, 0xc7, 0xed, 0x43, 0xf0, 0x1e, 0xf1, 0x81, 0xf6, 0x6a, 13 | 0xfa, 0xdb, 0xfd, 0xd9, 0x01, 0x11, 0x02, 0xf2, 0x03, 0xd5, 0x08, 0x1d, 14 | 0x0e, 0x13, 0x0e, 0x3a, 0x0a, 0xad, 0x0b, 0xfe, 0x0f, 0xfe, 0x0e, 0x53, 15 | 0x07, 0x4d, 0x03, 0x18, 0x05, 0x2d, 0x06, 0x1a, 0xff, 0x85, 0xf8, 0x74, 16 | 0xf9, 0xe4, 0xfd, 0x80, 0xf9, 0x13, 0xf1, 0xe4, 0xf2, 0x3b, 0xf6, 0x80, 17 | 0xf6, 0x13, 0xf2, 0xe1, 0xf3, 0xdb, 0xf9, 0xc3, 0xfe, 0x2f, 0xfd, 0x9b, 18 | 0xfd, 0x3b, 0x00, 0x92 19 | }; 20 | unsigned int ooo_raw_len = 184; 21 | -------------------------------------------------------------------------------- /src/Echo.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************/ 2 | /*! \class Echo 3 | \brief STK echo effect class. 4 | 5 | This class implements an echo effect. 6 | 7 | by Perry R. Cook and Gary P. Scavone, 1995--2019. 8 | */ 9 | /***************************************************/ 10 | 11 | #include "Echo.h" 12 | #include 13 | 14 | namespace stk { 15 | 16 | Echo :: Echo( unsigned long maximumDelay ) : Effect() 17 | { 18 | this->setMaximumDelay( maximumDelay ); 19 | delayLine_.setDelay( length_ >> 1 ); 20 | effectMix_ = 0.5; 21 | this->clear(); 22 | } 23 | 24 | void Echo :: clear( void ) 25 | { 26 | delayLine_.clear(); 27 | lastFrame_[0] = 0.0; 28 | } 29 | 30 | void Echo :: setMaximumDelay( unsigned long delay ) 31 | { 32 | if ( delay == 0 ) { 33 | oStream_ << "Echo::setMaximumDelay: parameter cannot be zero!"; 34 | handleError( StkError::WARNING ); return; 35 | } 36 | 37 | length_ = delay; 38 | delayLine_.setMaximumDelay( delay ); 39 | } 40 | 41 | void Echo :: setDelay( unsigned long delay ) 42 | { 43 | if ( delay > length_ ) { 44 | oStream_ << "Echo::setDelay: parameter is greater than maximum delay length!"; 45 | handleError( StkError::WARNING ); return; 46 | } 47 | 48 | delayLine_.setDelay( delay ); 49 | } 50 | 51 | } // stk namespace 52 | -------------------------------------------------------------------------------- /src/Sampler.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************/ 2 | /*! \class Sampler 3 | \brief STK sampling synthesis abstract base class. 4 | 5 | This instrument provides an ADSR envelope, a one-pole filter, and 6 | structures for an arbitrary number of attack and looped files. 7 | 8 | by Perry R. Cook and Gary P. Scavone, 1995--2019. 9 | */ 10 | /***************************************************/ 11 | 12 | #include "Sampler.h" 13 | 14 | namespace stk { 15 | 16 | Sampler :: Sampler( void ) 17 | { 18 | // We don't make the waves here yet, because 19 | // we don't know what they will be. 20 | baseFrequency_ = 440.0; 21 | attackGain_ = 0.25; 22 | loopGain_ = 0.25; 23 | } 24 | 25 | Sampler :: ~Sampler( void ) 26 | { 27 | unsigned int i; 28 | for ( i=0; ireset(); 37 | 38 | // Start the envelope. 39 | adsr_.keyOn(); 40 | 41 | } 42 | 43 | void Sampler :: keyOff( void ) 44 | { 45 | adsr_.keyOff(); 46 | } 47 | 48 | void Sampler :: noteOff( StkFloat amplitude ) 49 | { 50 | this->keyOff(); 51 | } 52 | 53 | } // stk namespace 54 | -------------------------------------------------------------------------------- /iOS/demo/iOS Demo/iOS Demo-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /projects/demo/scores/pictures.ski: -------------------------------------------------------------------------------- 1 | /* Howdy!! ToolKit96cpp SKINI File, Perry Cook */ 2 | NoteOn 0.000000 1 72 127.000000 3 | NoteOff 0.540000 1 72 63.500000 4 | NoteOn 0.060000 1 70 127.000000 5 | NoteOff 0.540000 1 70 63.500000 6 | NoteOn 0.060000 1 75 127.000000 7 | NoteOff 0.540000 1 75 63.500000 8 | NoteOn 0.060000 1 77 127.000000 9 | NoteOff 0.270023 1 77 63.500000 10 | NoteOn 0.030023 1 70 127.000000 11 | ControlChange 0.000000 1 2 96.000000 12 | NoteOff 0.299728 1 70 63.500000 13 | NoteOn 0.000317 1 79 127.000000 14 | NoteOff 0.540000 1 79 63.500000 15 | NoteOn 0.060000 1 77 127.000000 16 | NoteOff 0.270023 1 77 63.500000 17 | NoteOn 0.030023 1 70 127.000000 18 | ControlChange 0.000000 1 2 96.000000 19 | NoteOff 0.299728 1 70 63.500000 20 | NoteOn 0.000317 1 79 127.000000 21 | NoteOff 0.540000 1 79 63.500000 22 | NoteOn 0.060000 1 75 127.000000 23 | NoteOff 0.540000 1 75 63.500000 24 | NoteOn 0.060000 1 77 127.000000 25 | NoteOff 0.540000 1 77 63.500000 26 | NoteOn 0.060000 1 72 127.000000 27 | NoteOff 0.540000 1 72 63.500000 28 | NoteOn 0.060000 1 70 127.000000 29 | NoteOff 0.540000 1 70 63.500000 30 | NoteOff 0.060000 1 70 63.500000 31 | -------------------------------------------------------------------------------- /src/ArdBtSource.h: -------------------------------------------------------------------------------- 1 | 2 | #include "Stk.h" 3 | #ifdef __BT_A2DP__ 4 | 5 | #ifndef ARDBTSOURCE_H 6 | #define ARDBTSOURCE_H 7 | 8 | #include "WvOut.h" 9 | #include "ArdCommonOut.h" 10 | #include "BluetoothA2DPSource.h" 11 | #include "Voicer.h" 12 | #include "esp_log.h" 13 | 14 | namespace stk { 15 | 16 | /***************************************************/ 17 | /*! \class stk::ArdBtSource 18 | \brief ESP32 Output to Bluetooth 19 | 20 | Implementation of a A2DP Bluetooth Source for the ESP32 21 | which uses a Voicer as data source 22 | 23 | by Phil Schatzmann 24 | */ 25 | /***************************************************/ 26 | 27 | class ArdBtSource : public Stk 28 | { 29 | public: 30 | //! Default constructor ... 31 | ArdBtSource(); 32 | 33 | //! Destructor 34 | ~ArdBtSource(); 35 | 36 | //! Starts the Bluetooth device 37 | void start(char* name, Voicer &voicer); 38 | 39 | //! Checks if this device is still connnected 40 | bool isConnected(); 41 | 42 | //! Defines if the Flash NVS should be reset on start 43 | void setNVSInit(bool doInit); 44 | 45 | //! Defines if the BLE should be reset on start 46 | void setResetBLE(bool doInit); 47 | 48 | 49 | protected: 50 | Voicer *pVoicer; 51 | BluetoothA2DPSource *a2dp_source; 52 | 53 | }; 54 | 55 | } // stk namespace 56 | 57 | #endif 58 | #endif 59 | -------------------------------------------------------------------------------- /src/ArdUdp.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | 5 | #ifdef ARDUPD_H 6 | 7 | namespace stk { 8 | 9 | const char* APP_ArdUdp = "ArdUdp"; 10 | 11 | ArdUdp :: ArdUdp(char* addessStr,int targetPort) { 12 | this->isValidHostFlag = WiFi.hostByName(addessStr, targetUdpAddress); 13 | if (!this->isValidHostFlag){ 14 | ESP_LOGE(APP_ArdUdp, "x%x, Could not resolve host %s ", __func__, addessStr); 15 | } 16 | this->targetPort = targetPort; 17 | } 18 | 19 | ArdUdp :: ArdUdp(IPAddress address,int targetPort) { 20 | this->targetUdpAddress = address; 21 | this->targetPort = targetPort; 22 | } 23 | 24 | bool ArdUdp :: isValidHost() { 25 | return this->isValidHostFlag; 26 | } 27 | 28 | size_t ArdUdp :: write(const uint8_t * buffer, size_t size ) { 29 | size_t result = 0; 30 | if (this->beginPacket(targetUdpAddress, targetPort) == 1){ 31 | result = WiFiUDP::write(buffer, size); 32 | if (result>0){ 33 | bool packetOk = this->endPacket(); 34 | STK_LOGD("x%x, Number of bytes have %s been sent out: %d ", __func__, packetOk?"":"not", result); 35 | } 36 | //this->flush(); 37 | } else { 38 | STK_LOGD("x%x, beginPacked has failed ", __func__); 39 | this->isValidHostFlag = false; 40 | } 41 | return result; 42 | } 43 | 44 | } // stk 45 | 46 | #endif -------------------------------------------------------------------------------- /src/WvIn.h: -------------------------------------------------------------------------------- 1 | #ifndef STK_WVIN_H 2 | #define STK_WVIN_H 3 | 4 | #include "Stk.h" 5 | 6 | namespace stk { 7 | 8 | /***************************************************/ 9 | /*! \class stk::WvIn 10 | \brief STK audio input abstract base class. 11 | 12 | This class provides common functionality for a variety of audio 13 | data input subclasses. 14 | 15 | by Perry R. Cook and Gary P. Scavone, 1995--2019. 16 | */ 17 | /***************************************************/ 18 | 19 | class WvIn : public Stk 20 | { 21 | public: 22 | //! Return the number of audio channels in the data or stream. 23 | unsigned int channelsOut( void ) const { return data_.channels(); }; 24 | 25 | //! Return an StkFrames reference to the last computed sample frame. 26 | /*! 27 | If no file data is loaded, an empty container is returned. 28 | */ 29 | const StkFrames& lastFrame( void ) const { return lastFrame_; }; 30 | 31 | //! Compute one sample frame and return the specified \c channel value. 32 | virtual StkFloat tick( unsigned int channel = 0 ) = 0; 33 | 34 | //! Fill the StkFrames object with computed sample frames, starting at the specified channel and return the same reference. 35 | virtual StkFrames& tick( StkFrames& frames, unsigned int channel = 0 ) = 0; 36 | 37 | protected: 38 | 39 | StkFrames data_; 40 | StkFrames lastFrame_; 41 | 42 | }; 43 | 44 | } // stk namespace 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /projects/demo/scores/doogie.ski: -------------------------------------------------------------------------------- 1 | /* Howdy!! ToolKit96cpp SKINI File, Perry Cook */ 2 | NoteOn 0.000000 1 72 88.899998 3 | NoteOff 0.400000 1 72 63.500000 4 | NoteOn 0.000000 1 71 101.600002 5 | NoteOff 0.400000 1 71 63.500000 6 | NoteOn 0.000000 1 69 63.500000 7 | NoteOff 0.320000 1 69 63.500000 8 | NoteOn 0.080000 1 71 101.600002 9 | NoteOff 1.200000 1 71 63.500000 10 | NoteOn 0.000000 1 67 76.200003 11 | NoteOff 0.320000 1 67 63.500000 12 | NoteOn 0.080000 1 64 38.100002 13 | NoteOff 0.320000 1 64 63.500000 14 | NoteOn 0.080000 1 67 101.600002 15 | NoteOff 0.800000 1 67 63.500000 16 | NoteOn 0.000000 1 69 127.000000 17 | NoteOff 0.320000 1 69 63.500000 18 | NoteOn 0.080000 1 69 76.200003 19 | NoteOff 2.000000 1 69 63.500000 20 | NoteOn 0.000000 1 60 114.299997 21 | NoteOff 0.400000 1 60 63.500000 22 | NoteOn 0.000000 1 62 63.500000 23 | NoteOff 0.400000 1 62 63.500000 24 | NoteOn 0.000000 1 64 63.500000 25 | NoteOff 0.400000 1 64 63.500000 26 | NoteOn 0.000000 1 62 88.899998 27 | NoteOff 1.200000 1 62 63.500000 28 | NoteOn 0.000000 1 60 38.100002 29 | NoteOff 0.480000 1 60 63.500000 30 | NoteOn 0.120000 1 60 127.000000 31 | ControlChange 0.000000 1 1 127.000000 32 | NoteOff 2.000000 1 60 63.500000 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The Synthesis ToolKit in C++ (STK) 2 | 3 | Copyright (c) 1995-2019 Perry R. Cook and Gary P. Scavone 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | Any person wishing to distribute modifications to the Software is 17 | asked to send the modifications to the original developer so that they 18 | can be incorporated into the canonical version. This is, however, not 19 | a binding provision of this license. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 24 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 25 | ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 26 | CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 27 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | -------------------------------------------------------------------------------- /projects/examples/duplex.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {814114c0-fab4-4cc1-ae27-89ba6123b604} 6 | cpp;c;cxx;rc;def;r;odl;idl;hpj;bat 7 | 8 | 9 | {aa39f84f-28ef-40f0-a37a-bf42b59993e4} 10 | ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 11 | 12 | 13 | 14 | 15 | Source Files 16 | 17 | 18 | Source Files 19 | 20 | 21 | Source Files 22 | 23 | 24 | Source Files 25 | 26 | 27 | Source Files 28 | 29 | 30 | Source Files 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /examples/MIDI/AppleMidiAudioKit/AppleMidiAudioKit.ino: -------------------------------------------------------------------------------- 1 | /** 2 | * @file AppleMidiAudioKit.ino 3 | * @author Phil Schatzmann 4 | * @brief Example of handling midi input with Apple Midi and audio output to a AI Thinker AudioKit 5 | * 6 | * @copyright Copyright (c) 2021 7 | * 8 | */ 9 | #include 10 | #include 11 | #include "ArdStkMidiAction.h" 12 | #include "AudioTools.h" 13 | #include "AudioLibs/AudioKit.h" 14 | 15 | AudioKitStream kit; 16 | int channels = 2 17 | ArdStreamOut out(kit, channels); 18 | Clarinet clarinet(440); 19 | StkMidiAction action(&clarinet); 20 | AppleMidiServer apple(&action); 21 | 22 | const char *SSID = "your ssid"; 23 | const char *PWD = "your password"; 24 | 25 | // setup wifi for apple midi udp 26 | void setupWIFI() { 27 | WiFi.begin(SSID, PWD); 28 | while (WiFi.status() != WL_CONNECTED) { 29 | Serial.print('.'); 30 | delay(1000); 31 | } 32 | Serial.print("Connected to IP address: "); 33 | Serial.println(WiFi.localIP()); 34 | } 35 | 36 | void setup() { 37 | Serial.begin(115200); 38 | MidiLogLevel = MidiInfo; 39 | StkLogLevel = StkInfo; 40 | 41 | auto cfg = kit.defaultConfig(TX_MODE); 42 | cfg.channels = channels; 43 | cfg.bits_per_sample = 16; 44 | cfg.sample_rate = Stk::sampleRate(); 45 | kit.begin(cfg); 46 | 47 | setupWIFI(); 48 | apple.begin(5004); 49 | } 50 | 51 | void loop() { 52 | apple.loop(); 53 | for (int j=0;j<256;j++){ 54 | out.tick( action.tick() ); 55 | } 56 | delay(1); // feed watchdog 57 | } -------------------------------------------------------------------------------- /projects/demo/scores/lacrymos.ski: -------------------------------------------------------------------------------- 1 | /* Howdy!! ToolKit96cpp SKINI File, Perry Cook */ 2 | ControlChange 0.000000 1 1 20.000000 3 | ControlChange 0.000000 1 4 22.000000 4 | NoteOn 0.000000 1 46 64.000000 5 | ControlChange 0.200000 1 4 8.000000 6 | NoteOff 0.800000 1 46 64.500000 7 | NoteOn 0.000000 1 51 74.000000 8 | NoteOff 0.750000 1 51 74.500000 9 | NoteOn 0.000000 1 53 84.000000 10 | ControlChange 0.000000 1 4 0.000000 11 | NoteOff 0.250000 1 53 84.500000 12 | NoteOn 0.000000 1 54 84.000000 13 | ControlChange 0.000000 1 4 10.000000 14 | NoteOff 1.500000 1 54 84.500000 15 | NoteOn 0.000000 1 54 84.000000 16 | ControlChange 0.000000 1 4 8.000000 17 | NoteOff 0.500000 1 54 84.500000 18 | NoteOn 0.000000 1 53 84.000000 19 | ControlChange 0.000000 1 4 0.000000 20 | NoteOff 0.500000 1 53 84.500000 21 | NoteOn 0.000000 1 51 84.000000 22 | NoteOff 0.500000 1 51 84.500000 23 | NoteOn 0.000000 1 53 84.000000 24 | ControlChange 0.000000 1 4 4.000000 25 | NoteOff 0.500000 1 53 84.500000 26 | NoteOn 0.000000 1 54 94.000000 27 | NoteOff 0.500000 1 54 94.500000 28 | NoteOn 0.000000 1 51 74.000000 29 | ControlChange 0.000000 1 4 0.000000 30 | NoteOff 1.000000 1 51 74.500000 31 | NoteOn 0.000000 1 46 32.000000 32 | ControlChange 0.000000 1 4 8.000000 33 | ControlChange 0.000000 1 1 40.000000 34 | NoteOff 1.950023 1 46 64.500000 35 | -------------------------------------------------------------------------------- /src/Sphere.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************/ 2 | /*! \class Sphere 3 | \brief STK sphere class. 4 | 5 | This class implements a spherical ball with 6 | radius, mass, position, and velocity parameters. 7 | 8 | by Perry R. Cook, 1995--2019. 9 | */ 10 | /***************************************************/ 11 | 12 | #include "Sphere.h" 13 | #include 14 | 15 | namespace stk { 16 | 17 | Vector3D* Sphere::getRelativePosition( Vector3D* position ) 18 | { 19 | workingVector_.setXYZ(position->getX() - position_.getX(), 20 | position->getY() - position_.getY(), 21 | position->getZ() - position_.getZ()); 22 | return &workingVector_; 23 | }; 24 | 25 | StkFloat Sphere::getVelocity( Vector3D* velocity ) 26 | { 27 | velocity->setXYZ( velocity_.getX(), velocity_.getY(), velocity_.getZ() ); 28 | return velocity_.getLength(); 29 | }; 30 | 31 | StkFloat Sphere::isInside( Vector3D *position ) 32 | { 33 | // Return directed distance from aPosition to spherical boundary ( < 34 | // 0 if inside). 35 | StkFloat distance; 36 | Vector3D *tempVector; 37 | 38 | tempVector = this->getRelativePosition( position ); 39 | distance = tempVector->getLength(); 40 | return distance - radius_; 41 | }; 42 | 43 | void Sphere::addVelocity(StkFloat x, StkFloat y, StkFloat z) 44 | { 45 | velocity_.setX(velocity_.getX() + x); 46 | velocity_.setY(velocity_.getY() + y); 47 | velocity_.setZ(velocity_.getZ() + z); 48 | } 49 | 50 | } // stk namespace 51 | -------------------------------------------------------------------------------- /projects/examples/audioprobe.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {3ead9678-8354-4498-93d3-e834328937f5} 6 | cpp;c;cxx;rc;def;r;odl;idl;hpj;bat 7 | 8 | 9 | {b628491f-dca8-4c24-b290-3216afda20c5} 10 | h;hpp;hxx;hm;inl 11 | 12 | 13 | 14 | 15 | Source Files 16 | 17 | 18 | Source Files 19 | 20 | 21 | Source Files 22 | 23 | 24 | Source Files 25 | 26 | 27 | Source Files 28 | 29 | 30 | Source Files 31 | 32 | 33 | 34 | 35 | Header Files 36 | 37 | 38 | -------------------------------------------------------------------------------- /src/SingWave.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************/ 2 | /*! \class SingWave 3 | \brief STK "singing" looped soundfile class. 4 | 5 | This class loops a specified soundfile and modulates it both 6 | periodically and randomly to produce a pitched musical sound, like 7 | a simple voice or violin. In general, it is not be used alone 8 | because of "munchkinification" effects from pitch shifting. 9 | Within STK, it is used as an excitation source for other 10 | instruments. 11 | 12 | by Perry R. Cook and Gary P. Scavone, 1995--2019. 13 | */ 14 | /***************************************************/ 15 | 16 | #include "SingWave.h" 17 | 18 | namespace stk { 19 | 20 | SingWave :: SingWave( std::string fileName, bool raw ) 21 | { 22 | // An exception could be thrown here. 23 | wave_.openFile( fileName, raw ); 24 | 25 | rate_ = 1.0; 26 | sweepRate_ = 0.001; 27 | 28 | modulator_.setVibratoRate( 6.0 ); 29 | modulator_.setVibratoGain( 0.04 ); 30 | modulator_.setRandomGain( 0.005 ); 31 | 32 | this->setFrequency( 75.0 ); 33 | pitchEnvelope_.setRate( 1.0 ); 34 | this->tick(); 35 | this->tick(); 36 | pitchEnvelope_.setRate( sweepRate_ * rate_ ); 37 | } 38 | 39 | SingWave :: ~SingWave() 40 | { 41 | } 42 | 43 | void SingWave :: setFrequency( StkFloat frequency ) 44 | { 45 | StkFloat temp = rate_; 46 | rate_ = wave_.getSize() * frequency / Stk::sampleRate(); 47 | temp -= rate_; 48 | if ( temp < 0) temp = -temp; 49 | pitchEnvelope_.setTarget( rate_ ); 50 | pitchEnvelope_.setRate( sweepRate_ * temp ); 51 | } 52 | 53 | } // stk namespace 54 | -------------------------------------------------------------------------------- /src/Chorus.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************/ 2 | /*! \class Chorus 3 | \brief STK chorus effect class. 4 | 5 | This class implements a chorus effect. It takes a monophonic 6 | input signal and produces a stereo output signal. 7 | 8 | by Perry R. Cook and Gary P. Scavone, 1995--2019. 9 | */ 10 | /***************************************************/ 11 | 12 | #include "Chorus.h" 13 | 14 | namespace stk { 15 | 16 | Chorus :: Chorus( StkFloat baseDelay ) 17 | { 18 | lastFrame_.resize( 1, 2, 0.0 ); // resize lastFrame_ for stereo output 19 | delayLine_[0].setMaximumDelay( (unsigned long) (baseDelay * 1.414f) + 2); 20 | delayLine_[0].setDelay( baseDelay ); 21 | delayLine_[1].setMaximumDelay( (unsigned long) (baseDelay * 1.414f) + 2); 22 | delayLine_[1].setDelay( baseDelay ); 23 | baseLength_ = baseDelay; 24 | 25 | mods_[0].setFrequency( 0.2 ); 26 | mods_[1].setFrequency( 0.222222 ); 27 | modDepth_ = 0.05; 28 | effectMix_ = 0.5; 29 | this->clear(); 30 | } 31 | 32 | void Chorus :: clear( void ) 33 | { 34 | delayLine_[0].clear(); 35 | delayLine_[1].clear(); 36 | lastFrame_[0] = 0.0; 37 | lastFrame_[1] = 0.0; 38 | } 39 | 40 | void Chorus :: setModDepth( StkFloat depth ) 41 | { 42 | if ( depth < 0.0f || depth > 1.0f ) { 43 | oStream_ << "Chorus::setModDepth(): depth argument must be between 0.0 - 1.0!"; 44 | handleError( StkError::WARNING ); return; 45 | } 46 | 47 | modDepth_ = depth; 48 | }; 49 | 50 | void Chorus :: setModFrequency( StkFloat frequency ) 51 | { 52 | mods_[0].setFrequency( frequency ); 53 | mods_[1].setFrequency( frequency * 1.1111f ); 54 | } 55 | 56 | } // stk namespace 57 | -------------------------------------------------------------------------------- /rawwaves/makefunc.c: -------------------------------------------------------------------------------- 1 | /**********************************************/ 2 | /** Utility to make various functions **/ 3 | /** like exponential and log gain curves. **/ 4 | /** **/ 5 | /** Included here: **/ 6 | /** Yamaha TX81Z curves for master gain, **/ 7 | /** Envelope Rates (in normalized units), **/ 8 | /** envelope sustain level, and more.... **/ 9 | /**********************************************/ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | void main() 16 | { 17 | int i,j; 18 | double temp; 19 | double data[128]; 20 | 21 | /*************** TX81Z Master Gain *************/ 22 | for (i=0;i<100;i++) { 23 | data[i] = pow(2.0,-(99-i)/10.0); 24 | } 25 | data[0] = 0.0; 26 | printf("double __FM4Op_gains[99] = {"); 27 | for (i=0;i<100;i++) { 28 | if (i%8 == 0) printf("\n"); 29 | printf("%lf,",data[i]); 30 | } 31 | printf("};\n"); 32 | /*************** TX81Z Sustain Level ***********/ 33 | for (i=0;i<16;i++) { 34 | data[i] = pow(2.0,-(15-i)/2.0); 35 | } 36 | data[0] = 0.0; 37 | printf("double __FM4Op_susLevels[16] = {"); 38 | for (i=0;i<16;i++) { 39 | if (i%8 == 0) printf("\n"); 40 | printf("%lf,",data[i]); 41 | } 42 | printf("};\n"); 43 | /****************** Attack Rate ***************/ 44 | for (i=0;i<32;i++) { 45 | data[i] = 6.0 * pow(5.7,-(i-1)/5.0); 46 | } 47 | printf("double __FM4Op_attTimes[16] = {"); 48 | for (i=0;i<32;i++) { 49 | if (i%8 == 0) printf("\n"); 50 | printf("%lf,",data[i]); 51 | } 52 | printf("};\n"); 53 | exit(1); 54 | } 55 | 56 | -------------------------------------------------------------------------------- /projects/demo/scores/mandtune.ski: -------------------------------------------------------------------------------- 1 | /* Howdy!! ToolKit96cpp SKINI File, Perry Cook */ 2 | NoteOn 0.000082 2 55 82 3 | NoteOff 1.000000 2 55 0 4 | NoteOn 0.000082 2 55 82 5 | NoteOff 0.700000 2 55 0 6 | NoteOn 0.000082 2 62 82 7 | NoteOff 0.600000 2 62 0 8 | NoteOn 0.000082 2 62 82 9 | NoteOff 1.000000 2 62 0 10 | NoteOn 0.000082 2 69 82 11 | NoteOff 0.500000 2 69 0 12 | ControlChange 0.100000 1 1 10 13 | ControlChange 0.100000 1 1 20 14 | ControlChange 0.100000 1 1 30 15 | ControlChange 0.100000 1 1 40 16 | ControlChange 0.100000 1 1 50 17 | NoteOn 0.000000 2 69 82 18 | ControlChange 0.100000 1 1 40 19 | ControlChange 0.100000 1 1 30 20 | ControlChange 0.100000 1 1 22 21 | ControlChange 0.100000 1 1 12 22 | NoteOn 0.000000 2 69 82 23 | ControlChange 0.100000 1 1 10 24 | ControlChange 0.100000 1 1 20 25 | ControlChange 0.100000 1 1 30 26 | ControlChange 0.100000 1 1 40 27 | ControlChange 0.100000 1 1 50 28 | ControlChange 0.100000 1 1 60 29 | ControlChange 0.100000 1 1 50 30 | ControlChange 0.100000 1 1 40 31 | ControlChange 0.100000 1 1 30 32 | ControlChange 0.100000 1 1 20 33 | ControlChange 0.100000 1 1 10 34 | ControlChange 0.100000 1 1 6 35 | NoteOn 0.000082 2 69 82 36 | NoteOff 1.000000 2 69 0 37 | NoteOn 0.000082 2 76 82 38 | NoteOff 0.800000 2 76 0 39 | NoteOn 0.000082 2 76 82 40 | NoteOff 0.800000 2 76 0 41 | NoteOn 0.000082 2 55 82 42 | NoteOn 0.200000 2 62 82 43 | NoteOn 0.100000 2 71 82 44 | NoteOn 0.200000 2 79 82 45 | NoteOff 1.000000 2 79 82 46 | -------------------------------------------------------------------------------- /src/OnePole.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************/ 2 | /*! \class OnePole 3 | \brief STK one-pole filter class. 4 | 5 | This class implements a one-pole digital filter. A method is 6 | provided for setting the pole position along the real axis of the 7 | z-plane while maintaining a constant peak filter gain. 8 | 9 | by Perry R. Cook and Gary P. Scavone, 1995--2019. 10 | */ 11 | /***************************************************/ 12 | 13 | #include "OnePole.h" 14 | 15 | namespace stk { 16 | 17 | OnePole :: OnePole( StkFloat thePole ) 18 | { 19 | b_.resize( 1 ); 20 | a_.resize( 2 ); 21 | a_[0] = 1.0; 22 | inputs_.resize( 1, 1, 0.0 ); 23 | outputs_.resize( 2, 1, 0.0 ); 24 | 25 | this->setPole( thePole ); 26 | } 27 | 28 | OnePole :: ~OnePole() 29 | { 30 | } 31 | 32 | void OnePole :: setPole( StkFloat thePole ) 33 | { 34 | if ( std::abs( thePole ) >= 1.0f ) { 35 | oStream_ << "OnePole::setPole: argument (" << thePole << ") should be less than 1.0!"; 36 | handleError( StkError::WARNING ); return; 37 | } 38 | 39 | // Normalize coefficients for peak unity gain. 40 | if ( thePole > 0.0f ) 41 | b_[0] = (StkFloat) (1.0f - thePole); 42 | else 43 | b_[0] = (StkFloat) (1.0f + thePole); 44 | 45 | a_[1] = -thePole; 46 | } 47 | 48 | void OnePole :: setCoefficients( StkFloat b0, StkFloat a1, bool clearState ) 49 | { 50 | if ( std::abs( a1 ) >= 1.0f ) { 51 | oStream_ << "OnePole::setCoefficients: a1 argument (" << a1 << ") should be less than 1.0!"; 52 | handleError( StkError::WARNING ); return; 53 | } 54 | 55 | b_[0] = b0; 56 | a_[1] = a1; 57 | 58 | if ( clearState ) this->clear(); 59 | } 60 | 61 | } // stk namespace 62 | -------------------------------------------------------------------------------- /projects/examples/crtsine.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {095692d5-cac5-43e2-8ddc-68dc17318426} 6 | cpp;c;cxx;rc;def;r;odl;idl;hpj;bat 7 | 8 | 9 | {fd8a8bb9-aa6c-4625-b1d0-638775adf4ff} 10 | h;hpp;hxx;hm;inl 11 | 12 | 13 | {a8934afd-f390-431c-be23-40b7ce501c09} 14 | ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | 32 | 33 | Header Files 34 | 35 | 36 | Header Files 37 | 38 | 39 | Header Files 40 | 41 | 42 | -------------------------------------------------------------------------------- /projects/examples/playsmf.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {d1c32884-d0a0-4b8c-a9e4-4e74fd0a8316} 6 | cpp;c;cxx;rc;def;r;odl;idl;hpj;bat 7 | 8 | 9 | {ac7e3e33-d36b-48d2-96ce-6b4f65be53f8} 10 | h;hpp;hxx;hm;inl 11 | 12 | 13 | {45ff8f9a-0fed-4938-9a49-9780565d77a6} 14 | ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | 32 | 33 | Header Files 34 | 35 | 36 | Header Files 37 | 38 | 39 | Header Files 40 | 41 | 42 | -------------------------------------------------------------------------------- /iOS/demo/iOS Demo.xcodeproj/project.xcworkspace/xcshareddata/iOS Demo.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 4E1BA790-84C0-4F40-AECE-98269B537CE6 9 | IDESourceControlProjectName 10 | iOS Demo 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | CB047168-D1C4-40BC-85A3-6EB0A20AD217 14 | ssh://github.com/arielelkin/stk.git 15 | 16 | IDESourceControlProjectPath 17 | iOS/Demo/iOS Demo.xcodeproj/project.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | CB047168-D1C4-40BC-85A3-6EB0A20AD217 21 | ../../../.. 22 | 23 | IDESourceControlProjectURL 24 | ssh://github.com/arielelkin/stk.git 25 | IDESourceControlProjectVersion 26 | 110 27 | IDESourceControlProjectWCCIdentifier 28 | CB047168-D1C4-40BC-85A3-6EB0A20AD217 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | CB047168-D1C4-40BC-85A3-6EB0A20AD217 36 | IDESourceControlWCCName 37 | stk 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/Vector3D.h: -------------------------------------------------------------------------------- 1 | #ifndef STK_VECTOR3D_H 2 | #define STK_VECTOR3D_H 3 | 4 | #include "Stk.h" 5 | #include 6 | 7 | namespace stk { 8 | 9 | /***************************************************/ 10 | /*! \class stk::Vector3D 11 | \brief STK 3D vector class. 12 | 13 | This class implements a three-dimensional vector. 14 | 15 | by Perry R. Cook, 1995--2019. 16 | */ 17 | /***************************************************/ 18 | 19 | class Vector3D : public Stk 20 | { 21 | 22 | public: 23 | //! Default constructor taking optional initial X, Y, and Z values. 24 | Vector3D( StkFloat x = 0.0, StkFloat y = 0.0, StkFloat z = 0.0 ) { setXYZ( x, y, z ); }; 25 | 26 | //! Get the current X value. 27 | StkFloat getX( void ) { return X_; }; 28 | 29 | //! Get the current Y value. 30 | StkFloat getY( void ) { return Y_; }; 31 | 32 | //! Get the current Z value. 33 | StkFloat getZ( void ) { return Z_; }; 34 | 35 | //! Calculate the vector length. 36 | StkFloat getLength( void ); 37 | 38 | //! Set the X, Y, and Z values simultaniously. 39 | void setXYZ( StkFloat x, StkFloat y, StkFloat z ) { X_ = x; Y_ = y; Z_ = z; }; 40 | 41 | //! Set the X value. 42 | void setX( StkFloat x ) { X_ = x; }; 43 | 44 | //! Set the Y value. 45 | void setY( StkFloat y ) { Y_ = y; }; 46 | 47 | //! Set the Z value. 48 | void setZ( StkFloat z ) { Z_ = z; }; 49 | 50 | protected: 51 | StkFloat X_; 52 | StkFloat Y_; 53 | StkFloat Z_; 54 | }; 55 | 56 | inline StkFloat Vector3D :: getLength( void ) 57 | { 58 | StkFloat temp; 59 | temp = X_ * X_; 60 | temp += Y_ * Y_; 61 | temp += Z_ * Z_; 62 | temp = std::sqrt( temp ); 63 | return temp; 64 | } 65 | 66 | } // stk namespace 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /projects/demo/scores/thecars.ski: -------------------------------------------------------------------------------- 1 | /* Howdy!! ToolKit96cpp SKINI File, Perry Cook */ 2 | NoteOn 0.000000 1 48 127.000000 3 | NoteOff 0.380000 1 48 63.500000 4 | NoteOn 0.020000 1 48 127.000000 5 | NoteOff 0.100000 1 48 63.500000 6 | NoteOn 0.100000 1 48 127.000000 7 | NoteOff 0.100000 1 48 63.500000 8 | NoteOn 0.100000 1 51 127.000000 9 | NoteOff 0.100000 1 51 63.500000 10 | NoteOn 0.100000 1 51 127.000000 11 | NoteOff 0.570023 1 51 63.500000 12 | NoteOn 0.030023 1 50 127.000000 13 | NoteOff 0.100000 1 50 63.500000 14 | NoteOn 0.100000 1 46 127.000000 15 | NoteOff 0.200000 1 46 63.500000 16 | NoteOn 0.200000 1 60 127.000000 17 | NoteOff 0.950023 1 60 63.500000 18 | NoteOn 0.050023 1 77 127.000000 19 | NoteOff 0.190023 1 77 63.500000 20 | NoteOn 0.010023 1 72 127.000000 21 | NoteOff 0.190023 1 72 63.500000 22 | NoteOn 0.010023 1 69 127.000000 23 | NoteOff 0.100000 1 69 63.500000 24 | NoteOn 0.100000 1 75 127.000000 25 | NoteOff 0.380000 1 75 63.500000 26 | NoteOn 0.020000 1 70 127.000000 27 | NoteOff 0.100000 1 70 63.500000 28 | NoteOn 0.100000 1 67 127.000000 29 | NoteOff 0.100000 1 67 63.500000 30 | NoteOn 0.100000 1 74 127.000000 31 | NoteOff 0.380000 1 74 63.500000 32 | NoteOn 0.020000 1 70 127.000000 33 | NoteOff 0.100000 1 70 63.500000 34 | NoteOn 0.100000 1 65 127.000000 35 | NoteOff 0.100000 1 65 63.500000 36 | NoteOn 0.100000 1 72 127.000000 37 | ControlChange 0.000000 1 1 20.000000 38 | NoteOff 1.000000 1 72 63.500000 39 | -------------------------------------------------------------------------------- /src/Generator.h: -------------------------------------------------------------------------------- 1 | #ifndef STK_GENERATOR_H 2 | #define STK_GENERATOR_H 3 | 4 | #include "Stk.h" 5 | 6 | namespace stk { 7 | 8 | /***************************************************/ 9 | /*! \class stk::Generator 10 | \brief STK abstract unit generator parent class. 11 | 12 | This class provides limited common functionality for STK unit 13 | generator sample-source subclasses. It is general enough to 14 | support both monophonic and polyphonic output classes. 15 | 16 | by Perry R. Cook and Gary P. Scavone, 1995--2019. 17 | */ 18 | /***************************************************/ 19 | 20 | class Generator : public Stk 21 | { 22 | public: 23 | 24 | //! Class constructor. 25 | Generator( void ) { lastFrame_.resize( 1, 1, 0.0 ); }; 26 | 27 | //! Return the number of output channels for the class. 28 | unsigned int channelsOut( void ) const { return lastFrame_.channels(); }; 29 | 30 | //! Return an StkFrames reference to the last output sample frame. 31 | const StkFrames& lastFrame( void ) const { return lastFrame_; }; 32 | 33 | //! Fill the StkFrames object with computed sample frames, starting at the specified channel. 34 | /*! 35 | The \c channel argument plus the number of output channels must 36 | be less than the number of channels in the StkFrames argument (the 37 | first channel is specified by 0). However, range checking is only 38 | performed if _STK_DEBUG_ is defined during compilation, in which 39 | case an out-of-range value will trigger an StkError exception. 40 | */ 41 | virtual StkFrames& tick( StkFrames& frames, unsigned int channel = 0 ) = 0; 42 | 43 | protected: 44 | 45 | StkFrames lastFrame_; 46 | }; 47 | 48 | } // stk namespace 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /src/ModalBar.h: -------------------------------------------------------------------------------- 1 | #ifndef STK_MODALBAR_H 2 | #define STK_MODALBAR_H 3 | 4 | #include "Modal.h" 5 | 6 | namespace stk { 7 | 8 | /***************************************************/ 9 | /*! \class stk::ModalBar 10 | \brief STK resonant bar instrument class. 11 | 12 | This class implements a number of different 13 | struck bar instruments. It inherits from the 14 | Modal class. 15 | 16 | Control Change Numbers: 17 | - Stick Hardness = 2 18 | - Stick Position = 4 19 | - Vibrato Gain = 1 20 | - Vibrato Frequency = 11 21 | - Direct Stick Mix = 8 22 | - Volume = 128 23 | - Modal Presets = 16 24 | - Marimba = 0 25 | - Vibraphone = 1 26 | - Agogo = 2 27 | - Wood1 = 3 28 | - Reso = 4 29 | - Wood2 = 5 30 | - Beats = 6 31 | - Two Fixed = 7 32 | - Clump = 8 33 | 34 | by Perry R. Cook and Gary P. Scavone, 1995--2019. 35 | */ 36 | /***************************************************/ 37 | 38 | class ModalBar : public Modal 39 | { 40 | public: 41 | //! Class constructor. 42 | ModalBar( void ); 43 | 44 | //! Class destructor. 45 | ~ModalBar( void ); 46 | 47 | //! Set stick hardness (0.0 - 1.0). 48 | void setStickHardness( StkFloat hardness ); 49 | 50 | //! Set stick position (0.0 - 1.0). 51 | void setStrikePosition( StkFloat position ); 52 | 53 | //! Select a bar preset (currently modulo 9). 54 | void setPreset( int preset ); 55 | 56 | //! Set the modulation (vibrato) depth. 57 | void setModulationDepth( StkFloat mDepth ); 58 | 59 | //! Perform the control change specified by \e number and \e value (0.0 - 128.0). 60 | void controlChange( int number, StkFloat value ); 61 | }; 62 | 63 | } // stk namespace 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /src/Phonemes.h: -------------------------------------------------------------------------------- 1 | #ifndef STK_PHONEMES_H 2 | #define STK_PHONEMES_H 3 | 4 | #include "Stk.h" 5 | 6 | namespace stk { 7 | 8 | /***************************************************/ 9 | /*! \class stk::Phonemes 10 | \brief STK phonemes table. 11 | 12 | This class does nothing other than declare a 13 | set of 32 static phoneme formant parameters 14 | and provide access to those values. 15 | 16 | by Perry R. Cook and Gary P. Scavone, 1995--2019. 17 | */ 18 | /***************************************************/ 19 | 20 | class Phonemes : public Stk 21 | { 22 | public: 23 | 24 | Phonemes( void ); 25 | 26 | ~Phonemes( void ); 27 | 28 | //! Returns the phoneme name for the given index (0-31). 29 | static const char *name( unsigned int index ); 30 | 31 | //! Returns the voiced component gain for the given phoneme index (0-31). 32 | static StkFloat voiceGain( unsigned int index ); 33 | 34 | //! Returns the unvoiced component gain for the given phoneme index (0-31). 35 | static StkFloat noiseGain( unsigned int index ); 36 | 37 | //! Returns the formant frequency for the given phoneme index (0-31) and partial (0-3). 38 | static StkFloat formantFrequency( unsigned int index, unsigned int partial ); 39 | 40 | //! Returns the formant radius for the given phoneme index (0-31) and partial (0-3). 41 | static StkFloat formantRadius( unsigned int index, unsigned int partial ); 42 | 43 | //! Returns the formant gain for the given phoneme index (0-31) and partial (0-3). 44 | static StkFloat formantGain( unsigned int index, unsigned int partial ); 45 | 46 | private: 47 | 48 | static const char phonemeNames[][4]; 49 | static const StkFloat phonemeGains[][2]; 50 | static const StkFloat phonemeParameters[][4][3]; 51 | }; 52 | 53 | } // stk namespace 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /projects/examples/midiprobe.cpp: -------------------------------------------------------------------------------- 1 | // midiprobe.cpp 2 | // 3 | // Simple program to check MIDI inputs and outputs. 4 | // 5 | // by Gary Scavone, 2003-2004. 6 | 7 | #include 8 | #include 9 | #include "RtMidi.h" 10 | 11 | int main() 12 | { 13 | RtMidiIn *midiin = 0; 14 | RtMidiOut *midiout = 0; 15 | 16 | // RtMidiIn constructor 17 | try { 18 | midiin = new RtMidiIn(); 19 | } 20 | catch ( RtMidiError &error ) { 21 | error.printMessage(); 22 | exit( EXIT_FAILURE ); 23 | } 24 | 25 | // Check inputs. 26 | unsigned int nPorts = midiin->getPortCount(); 27 | std::cout << "\nThere are " << nPorts << " MIDI input sources available.\n"; 28 | std::string portName; 29 | unsigned int i; 30 | for ( i=0; igetPortName(i); 33 | } 34 | catch ( RtMidiError &error ) { 35 | error.printMessage(); 36 | goto cleanup; 37 | } 38 | std::cout << " Input Port #" << i+1 << ": " << portName << '\n'; 39 | } 40 | 41 | // RtMidiOut constructor 42 | try { 43 | midiout = new RtMidiOut(); 44 | } 45 | catch ( RtMidiError &error ) { 46 | error.printMessage(); 47 | exit( EXIT_FAILURE ); 48 | } 49 | 50 | // Check outputs. 51 | nPorts = midiout->getPortCount(); 52 | std::cout << "\nThere are " << nPorts << " MIDI output ports available.\n"; 53 | for ( i=0; igetPortName(i); 56 | } 57 | catch ( RtMidiError &error ) { 58 | error.printMessage(); 59 | goto cleanup; 60 | } 61 | std::cout << " Output Port #" << i+1 << ": " << portName << '\n'; 62 | } 63 | std::cout << '\n'; 64 | 65 | // Clean up 66 | cleanup: 67 | delete midiin; 68 | delete midiout; 69 | 70 | return 0; 71 | } 72 | -------------------------------------------------------------------------------- /projects/examples/play.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {d5b611e5-0a75-4dc8-8e19-4257179653ca} 6 | cpp;c;cxx;rc;def;r;odl;idl;hpj;bat 7 | 8 | 9 | {0b06e5ce-8306-471d-a4f9-160ad9662ba2} 10 | h;hpp;hxx;hm;inl 11 | 12 | 13 | {112a423d-b634-46ae-a610-d1064b755894} 14 | ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | Source Files 32 | 33 | 34 | 35 | 36 | Header Files 37 | 38 | 39 | Header Files 40 | 41 | 42 | Header Files 43 | 44 | 45 | -------------------------------------------------------------------------------- /docs/html/functions_func_j.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Arduino STK: Class Members - Functions 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 19 | 20 | 25 | 26 | 27 |
21 |
Arduino STK 22 |  4.6.2 23 |
24 |
28 |
29 | 30 | 31 |
32 |
33 |   34 | 35 |

- j -

40 |
41 | 42 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /docs/html/functions_func_q.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Arduino STK: Class Members - Functions 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 19 | 20 | 25 | 26 | 27 |
21 |
Arduino STK 22 |  4.6.2 23 |
24 |
28 |
29 | 30 | 31 |
32 |
33 |   34 | 35 |

- q -

40 |
41 | 42 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /examples/PerformanceMemory/PerformanceMemory.ino: -------------------------------------------------------------------------------- 1 | /** 2 | * @file PerformanceMemory.ino 3 | * @author Phil Schatzmann 4 | * @brief We mesure the MemoryLoop performance with different memory types 5 | * @version 0.1 6 | * @date 2022-09-13 7 | * 8 | * @copyright Copyright (c) 2022 9 | * 10 | */ 11 | 12 | #include "StkAll.h" 13 | #include 14 | #ifdef ESP32 15 | #include "esp_heap_caps.h" 16 | #endif 17 | 18 | void measure(const char*title, MemoryLoop *src) { 19 | char msg[80]; 20 | uint64_t start = millis(); 21 | // generate samples for 10 seconds at 44100 22 | int sec = 10; 23 | for (int j=0;j<44100*sec;j++){ 24 | float f = src->tick(); 25 | } 26 | snprintf(msg, 80, "%s - Time for %d sec music: %f sec",title, sec, static_cast(millis()-start)/1000.0); 27 | Serial.println(msg); 28 | } 29 | 30 | 31 | void setup() { 32 | Serial.begin(115200); 33 | // wait for serial to be available 34 | while(!Serial); 35 | 36 | StkLogLevel = StkWarning; 37 | Stk::setSampleRate(44100); 38 | 39 | MemoryFS::reset(); 40 | MemoryFS::useRAM(false); // default value 41 | MemoryLoop *src = new MemoryLoop( Stk::rawwavePath() + "sinewave.raw", sinewave_raw,sinewave_raw_len ); 42 | measure("progmem", src); 43 | 44 | delete src; 45 | MemoryFS::reset(); 46 | MemoryFS::useRAM(true); 47 | src = new MemoryLoop( Stk::rawwavePath() + "sinewave.raw", sinewave_raw,sinewave_raw_len ); 48 | measure("ram", src); 49 | 50 | #ifdef ESP32 51 | delete src; 52 | MemoryFS::reset(); 53 | heap_caps_malloc_extmem_enable(sinewave_raw_len-10); // allocate in psram 54 | MemoryFS::useRAM(true); 55 | src = new MemoryLoop( Stk::rawwavePath() + "sinewave.raw", sinewave_raw,sinewave_raw_len ); 56 | measure("psram", src); 57 | #endif 58 | 59 | } 60 | 61 | void loop() { 62 | 63 | } -------------------------------------------------------------------------------- /src/ArdCommonOut.h: -------------------------------------------------------------------------------- 1 | #include "Stk.h" 2 | #ifdef __STREAMS__ 3 | 4 | #ifndef ARDCOMMONOUT_H 5 | #define ARDCOMMONOUT_H 6 | 7 | #include "WvOut.h" 8 | 9 | namespace stk { 10 | /***************************************************/ 11 | /*! \class stk::ArdCommonOut 12 | \brief STK Common Output for Arduiono 13 | 14 | Common Implementation of Output of int16 data to different 15 | devices used by Arduino 16 | 17 | by Phil Schatzmann 18 | 19 | */ 20 | /***************************************************/ 21 | 22 | class ArdCommonOut : public WvOut 23 | { 24 | public: 25 | //! Default constructor ... 26 | ArdCommonOut( unsigned int nChannels = 1 ); 27 | 28 | //! Class destructor. 29 | ~ArdCommonOut(); 30 | 31 | 32 | //! Output a single sample to all channels in a sample frame. 33 | /*! 34 | An StkError is thrown if an output error occurs. If a socket 35 | connection does not exist, the function does nothing (a warning 36 | will be issued if _STK_DEBUG_ is defined during compilation). 37 | */ 38 | virtual void tick( const StkFloat sample ); 39 | 40 | //! Output the StkFrames data. 41 | /*! 42 | An StkError will be thrown if an output error occurs. An 43 | StkError will also be thrown if _STK_DEBUG_ is defined during 44 | compilation and there is an incompatability between the number of 45 | channels in the FileWvOut object and that in the StkFrames object. 46 | If a socket connection does not exist, the function does nothing 47 | (a warning will be issued if _STK_DEBUG_ is defined during 48 | compilation). 49 | */ 50 | virtual void tick( const StkFrames& frames ); 51 | 52 | protected: 53 | 54 | virtual void write(StkFloat value) = 0; 55 | virtual void write(int16_t value) = 0; 56 | 57 | unsigned int nChannels; 58 | }; 59 | 60 | } // stk namespace 61 | 62 | #endif 63 | #endif 64 | -------------------------------------------------------------------------------- /STK.podspec: -------------------------------------------------------------------------------- 1 | # To lint the spec: 2 | # pod spec lint --skip-import-validation --allow-warnings 3 | # To publish: 4 | # pod trunk push STK.podspec --skip-import-validation --allow-warnings 5 | 6 | Pod::Spec.new do |spec| 7 | spec.name = 'STK' 8 | spec.version = '4.6.1' 9 | spec.summary = 'The Synthesis ToolKit in C++ is a set of open source audio signal processing and algorithmic synthesis classes.' 10 | spec.homepage = 'https://ccrma.stanford.edu/software/stk/' 11 | spec.source = { :git => 'https://github.com/thestk/stk.git', :tag => spec.version } 12 | spec.license = { :type => 'MIT' } 13 | spec.author = { "Ariel Elkin" => "ariel@arivibes.com" } 14 | spec.platform = :ios 15 | spec.ios.deployment_target = "10.0" 16 | spec.source_files = [ 17 | "src/*.cpp", 18 | "include/*.h" 19 | ] 20 | spec.public_header_files = [ 21 | "include/*.h", 22 | "include/SKINImsg.h", 23 | "include/SKINItbl.h" 24 | ] 25 | spec.exclude_files = [ 26 | "include/Thread.h", 27 | "src/Thread.cpp", 28 | "include/Mutex.h", 29 | "src/Mutex.cpp", 30 | "include/UdpSocket.h", 31 | "src/UdpSocket.cpp", 32 | "include/Socket.h", 33 | "src/Socket.cpp", 34 | "include/TcpClient.h", 35 | "src/TcpClient.cpp", 36 | "include/TcpServer.h", 37 | "src/TcpServer.cpp", 38 | "include/InetWvIn.h", 39 | "src/InetWvIn.cpp", 40 | "include/InetWvOut.h", 41 | "src/InetWvOut.cpp", 42 | "include/RtAudio.h", 43 | "src/RtAudio.cpp", 44 | "include/RtMidi.h", 45 | "src/RtMidi.cpp", 46 | "include/RtWvIn.h", 47 | "src/RtWvIn.cpp", 48 | "include/RtWvOut.h", 49 | "src/RtWvOut.cpp", 50 | "include/RtError.h" 51 | ] 52 | spec.preserve_paths = "README.MD" 53 | spec.resource_bundles = { "rawwaves": "rawwaves/*.raw" } 54 | spec.libraries = 'c++' 55 | end 56 | -------------------------------------------------------------------------------- /projects/examples/sine.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {e502f99d-93ff-4f35-bafe-7e3f1cb66760} 6 | cpp;c;cxx;rc;def;r;odl;idl;hpj;bat 7 | 8 | 9 | {04e044e0-da39-4b71-bddd-a7a5df53ee0c} 10 | h;hpp;hxx;hm;inl 11 | 12 | 13 | {ad6ba706-7eb3-411a-aa61-692cb0ac7f1b} 14 | ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | Source Files 32 | 33 | 34 | 35 | 36 | Header Files 37 | 38 | 39 | Header Files 40 | 41 | 42 | Header Files 43 | 44 | 45 | Header Files 46 | 47 | 48 | -------------------------------------------------------------------------------- /projects/examples/foursine.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {b4d64f6d-a57d-4d85-8efe-24faba18ead8} 6 | cpp;c;cxx;rc;def;r;odl;idl;hpj;bat 7 | 8 | 9 | {bf2bfdb7-dd4a-43b6-bc8c-bce966b4861a} 10 | h;hpp;hxx;hm;inl 11 | 12 | 13 | {6557afcc-d351-4c05-ad0f-954add1fc12d} 14 | ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | Source Files 32 | 33 | 34 | 35 | 36 | Header Files 37 | 38 | 39 | Header Files 40 | 41 | 42 | Header Files 43 | 44 | 45 | Header Files 46 | 47 | 48 | -------------------------------------------------------------------------------- /docs/html/functions_j.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Arduino STK: Class Members 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 19 | 20 | 25 | 26 | 27 |
21 |
Arduino STK 22 |  4.6.2 23 |
24 |
28 |
29 | 30 | 31 |
32 |
33 |
Here is a list of all documented class members with links to the class documentation for each member:
34 | 35 |

- j -

40 |
41 | 42 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /docs/html/functions_q.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Arduino STK: Class Members 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 19 | 20 | 25 | 26 | 27 |
21 |
Arduino STK 22 |  4.6.2 23 |
24 |
28 |
29 | 30 | 31 |
32 |
33 |
Here is a list of all documented class members with links to the class documentation for each member:
34 | 35 |

- q -

40 |
41 | 42 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /projects/demo/scores/marimtst.ski: -------------------------------------------------------------------------------- 1 | /* Howdy!! ToolKit96cpp SKINI File, Perry Cook */ 2 | NoteOn 0.000000 1 32 88.899998 3 | NoteOn 0.050000 1 32 88.899998 4 | NoteOn 0.050000 1 32 88.899998 5 | NoteOn 0.050000 1 32 88.899998 6 | NoteOn 0.050000 1 32 88.899998 7 | StickHardness 0.000000 1 100 8 | NoteOn 0.050000 1 32 88.899998 9 | NoteOn 0.050000 1 32 88.899998 10 | NoteOn 0.050000 1 32 88.899998 11 | NoteOn 0.050000 1 32 88.899998 12 | NoteOn 0.050000 1 32 88.899998 13 | StickHardness 0.000000 1 80 14 | NoteOn 0.050000 1 32 88.899998 15 | NoteOn 0.050000 1 32 88.899998 16 | NoteOn 0.050000 1 32 88.899998 17 | NoteOn 0.050000 1 32 88.899998 18 | NoteOn 0.050000 1 32 88.899998 19 | StickHardness 0.000000 1 60 20 | NoteOn 0.050000 1 32 88.899998 21 | NoteOn 0.050000 1 32 88.899998 22 | NoteOn 0.050000 1 32 88.899998 23 | NoteOn 0.050000 1 32 88.899998 24 | NoteOn 0.050000 1 32 88.899998 25 | NoteOn 0.050000 1 32 88.899998 26 | StickHardness 0.000000 1 40 27 | NoteOn 0.050000 1 32 88.899998 28 | NoteOn 0.050000 1 32 88.899998 29 | NoteOn 0.050000 1 32 88.899998 30 | NoteOn 0.050000 1 32 88.899998 31 | NoteOn 0.050000 1 32 88.899998 32 | NoteOn 0.050000 1 32 88.899998 33 | StickHardness 0.000000 1 20 34 | NoteOn 0.050000 1 32 88.899998 35 | NoteOn 0.050000 1 32 88.899998 36 | NoteOn 0.050000 1 32 88.899998 37 | NoteOn 0.050000 1 32 88.899998 38 | NoteOn 0.050000 1 32 88.899998 39 | StickHardness 0.000000 1 10 40 | NoteOn 0.050000 1 32 88.899998 41 | NoteOn 0.050000 1 32 88.899998 42 | NoteOn 0.050000 1 32 88.899998 43 | NoteOn 0.050000 1 32 88.899998 44 | NoteOn 0.050000 1 32 88.899998 45 | NoteOn 0.050000 1 32 88.899998 46 | -------------------------------------------------------------------------------- /docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Arduino STK: src Directory Reference 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 19 | 20 | 25 | 26 | 27 |
21 |
Arduino STK 22 |  4.6.2 23 |
24 |
28 |
29 | 30 | 31 | 35 |
36 |
37 |
38 |
src Directory Reference
39 |
40 |
41 |
42 | 43 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /docs/html/functions_func_h.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Arduino STK: Class Members - Functions 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 19 | 20 | 25 | 26 | 27 |
21 |
Arduino STK 22 |  4.6.2 23 |
24 |
28 |
29 | 30 | 31 |
32 |
33 |   34 | 35 |

- h -

43 |
44 | 45 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /docs/html/functions_func_u.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Arduino STK: Class Members - Functions 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 19 | 20 | 25 | 26 | 27 |
21 |
Arduino STK 22 |  4.6.2 23 |
24 |
28 |
29 | 30 | 31 |
32 |
33 |   34 | 35 |

- u -

43 |
44 | 45 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /src/Socket.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************/ 2 | /*! \class Socket 3 | \brief STK internet socket abstract base class. 4 | 5 | This class provides common functionality for TCP and UDP internet 6 | socket server and client subclasses. 7 | 8 | by Perry R. Cook and Gary P. Scavone, 1995--2019. 9 | */ 10 | /***************************************************/ 11 | 12 | #include "Socket.h" 13 | #ifndef __NOIP__ 14 | namespace stk { 15 | 16 | Socket :: Socket() 17 | { 18 | soket_ = -1; 19 | port_ = -1; 20 | } 21 | 22 | Socket :: ~Socket() 23 | { 24 | this->close( soket_ ); 25 | 26 | #if defined(__OS_WINDOWS__) 27 | 28 | WSACleanup(); 29 | 30 | #endif 31 | } 32 | 33 | void Socket :: close( int socket ) 34 | { 35 | if ( !isValid( socket ) ) return; 36 | 37 | #if (defined(__OS_IRIX__) || defined(__OS_LINUX__) || defined(__OS_MACOSX__)) 38 | 39 | ::close( socket ); 40 | 41 | #elif defined(__OS_WINDOWS__) 42 | 43 | ::closesocket( socket ); 44 | 45 | #endif 46 | } 47 | 48 | void Socket :: setBlocking( int socket, bool enable ) 49 | { 50 | if ( !isValid( socket ) ) return; 51 | 52 | #if (defined(__OS_IRIX__) || defined(__OS_LINUX__) || defined(__OS_MACOSX__)) 53 | 54 | int tmp = ::fcntl( socket, F_GETFL, 0 ); 55 | if ( tmp >= 0 ) 56 | tmp = ::fcntl( socket, F_SETFL, enable ? (tmp &~ O_NONBLOCK) : (tmp | O_NONBLOCK) ); 57 | 58 | #elif defined(__OS_WINDOWS__) 59 | 60 | unsigned long non_block = !enable; 61 | ioctlsocket( socket, FIONBIO, &non_block ); 62 | 63 | #endif 64 | } 65 | 66 | int Socket :: writeBuffer(int socket, const void *buffer, long bufferSize, int flags ) 67 | { 68 | if ( !isValid( socket ) ) return -1; 69 | return send( socket, (const char *)buffer, bufferSize, flags ); 70 | } 71 | 72 | int Socket :: readBuffer(int socket, void *buffer, long bufferSize, int flags ) 73 | { 74 | if ( !isValid( socket ) ) return -1; 75 | return recv( socket, (char *)buffer, bufferSize, flags ); 76 | } 77 | 78 | } // stk namespace 79 | 80 | #endif 81 | 82 | -------------------------------------------------------------------------------- /projects/examples/crtsine.cpp: -------------------------------------------------------------------------------- 1 | // crtsine.cpp STK tutorial program 2 | 3 | #include "SineWave.h" 4 | #include "RtAudio.h" 5 | using namespace stk; 6 | 7 | // This tick() function handles sample computation only. It will be 8 | // called automatically when the system needs a new buffer of audio 9 | // samples. 10 | int tick( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames, 11 | double streamTime, RtAudioStreamStatus status, void *dataPointer ) 12 | { 13 | SineWave *sine = (SineWave *) dataPointer; 14 | register StkFloat *samples = (StkFloat *) outputBuffer; 15 | 16 | for ( unsigned int i=0; itick(); 18 | 19 | return 0; 20 | } 21 | 22 | int main() 23 | { 24 | // Set the global sample rate before creating class instances. 25 | Stk::setSampleRate( 44100.0 ); 26 | 27 | SineWave sine; 28 | RtAudio dac; 29 | 30 | // Figure out how many bytes in an StkFloat and setup the RtAudio stream. 31 | RtAudio::StreamParameters parameters; 32 | parameters.deviceId = dac.getDefaultOutputDevice(); 33 | parameters.nChannels = 1; 34 | RtAudioFormat format = ( sizeof(StkFloat) == 8 ) ? RTAUDIO_FLOAT64 : RTAUDIO_FLOAT32; 35 | unsigned int bufferFrames = RT_BUFFER_SIZE; 36 | try { 37 | dac.openStream( ¶meters, NULL, format, (unsigned int)Stk::sampleRate(), &bufferFrames, &tick, (void *)&sine ); 38 | } 39 | catch ( RtAudioError &error ) { 40 | error.printMessage(); 41 | goto cleanup; 42 | } 43 | 44 | sine.setFrequency(440.0); 45 | 46 | try { 47 | dac.startStream(); 48 | } 49 | catch ( RtAudioError &error ) { 50 | error.printMessage(); 51 | goto cleanup; 52 | } 53 | 54 | // Block waiting here. 55 | char keyhit; 56 | std::cout << "\nPlaying ... press to quit.\n"; 57 | std::cin.get( keyhit ); 58 | 59 | // Shut down the output stream. 60 | try { 61 | dac.closeStream(); 62 | } 63 | catch ( RtAudioError &error ) { 64 | error.printMessage(); 65 | } 66 | 67 | cleanup: 68 | 69 | return 0; 70 | } 71 | -------------------------------------------------------------------------------- /docs/html/functions_u.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Arduino STK: Class Members 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 19 | 20 | 25 | 26 | 27 |
21 |
Arduino STK 22 |  4.6.2 23 |
24 |
28 |
29 | 30 | 31 |
32 |
33 |
Here is a list of all documented class members with links to the class documentation for each member:
34 | 35 |

- u -

43 |
44 | 45 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /docs/html/functions_h.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Arduino STK: Class Members 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 19 | 20 | 25 | 26 | 27 |
21 |
Arduino STK 22 |  4.6.2 23 |
24 |
28 |
29 | 30 | 31 |
32 |
33 |
Here is a list of all documented class members with links to the class documentation for each member:
34 | 35 |

- h -

43 |
44 | 45 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /projects/eguitar/README-eguitar.txt: -------------------------------------------------------------------------------- 1 | This is eguitar by Gary Scavone, McGill University, 2012. 2 | 3 | This is a program to create a simple electric guitar model using 4 | the STK Guitar class. The is model is derived in part from an 5 | implementation made by Nicholas Donaldson at McGill University in 6 | 2009. The distortion model is poor, using a simple soft-clipping 7 | expression provided by Charles R. Sullivan in "Extending the 8 | Karplus-String Algorithm to Synthesize Electric Guitar Timbres with 9 | Distortion and Feedback," Computer Music Journal, Vol.14 No.3, Fall 10 | 1990. Other distortion models would be better, such as that found 11 | in Pakarinen and Yeh's "A Review of Digital Techniques for Modeling 12 | Vacuum-Tube Guitar Amplifiers," Computer Music Journal, Vol 33 13 | No. 2, Summer 2009. 14 | 15 | This program performs simple voice management if all noteOn and 16 | noteOff events are on channel 0. Otherwise, channel values > 0 are 17 | mapped to specific string numbers. By default, the program creates 18 | a 6-string guitar. If the normalized noteOn() velocity is < 0.2, a 19 | string is undamped but not plucked (this is implemented in the 20 | stk::Guitar class). Thus, you can lightly depress a key on a MIDI 21 | keyboard and then experiment with string coupling. 22 | 23 | The Tcl/Tk GUI allows you to experiment with various parameter 24 | settings and that can be used in conjunction with a MIDI keyboard 25 | as: wish < tcl/EGuitar.tcl | ./eguitar -or -ip -im 1 26 | 27 | For the moment, this program does not support pitch bends. 28 | 29 | In the eguitar directory, type: 30 | 31 | > make 32 | 33 | to compile and then 34 | 35 | > ElectricGuitar.bat 36 | 37 | to run the program with the Tcl/Tk GUI. 38 | 39 | There are many improvements that could be made to this project. In 40 | particular, you could record real body responses from different 41 | guitars and use those with the Guitar class. As well, you could 42 | improve the distortion model and perhaps add some typical electric 43 | guitar effects, such as an echo. If you find any bugs, please let me 44 | know! 45 | -------------------------------------------------------------------------------- /src/PoleZero.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************/ 2 | /*! \class PoleZero 3 | \brief STK one-pole, one-zero filter class. 4 | 5 | This class implements a one-pole, one-zero digital filter. A 6 | method is provided for creating an allpass filter with a given 7 | coefficient. Another method is provided to create a DC blocking 8 | filter. 9 | 10 | by Perry R. Cook and Gary P. Scavone, 1995--2019. 11 | */ 12 | /***************************************************/ 13 | 14 | #include "PoleZero.h" 15 | 16 | namespace stk { 17 | 18 | PoleZero :: PoleZero() 19 | { 20 | // Default setting for pass-through. 21 | b_.resize( 2, 0.0 ); 22 | a_.resize( 2, 0.0 ); 23 | b_[0] = 1.0; 24 | a_[0] = 1.0; 25 | inputs_.resize( 2, 1, 0.0 ); 26 | outputs_.resize( 2, 1, 0.0 ); 27 | } 28 | 29 | PoleZero :: ~PoleZero() 30 | { 31 | } 32 | 33 | void PoleZero :: setCoefficients( StkFloat b0, StkFloat b1, StkFloat a1, bool clearState ) 34 | { 35 | if ( std::abs( a1 ) >= 1.0f ) { 36 | oStream_ << "PoleZero::setCoefficients: a1 argument (" << a1 << ") should be less than 1.0!"; 37 | handleError( StkError::WARNING ); return; 38 | } 39 | 40 | b_[0] = b0; 41 | b_[1] = b1; 42 | a_[1] = a1; 43 | 44 | if ( clearState ) this->clear(); 45 | } 46 | 47 | void PoleZero :: setAllpass( StkFloat coefficient ) 48 | { 49 | if ( std::abs( coefficient ) >= 1.0f ) { 50 | oStream_ << "PoleZero::setAllpass: argument (" << coefficient << ") makes filter unstable!"; 51 | handleError( StkError::WARNING ); return; 52 | } 53 | 54 | b_[0] = coefficient; 55 | b_[1] = 1.0; 56 | a_[0] = 1.0; // just in case 57 | a_[1] = coefficient; 58 | } 59 | 60 | void PoleZero :: setBlockZero( StkFloat thePole ) 61 | { 62 | if ( std::abs( thePole ) >= 1.0f ) { 63 | oStream_ << "PoleZero::setBlockZero: argument (" << thePole << ") makes filter unstable!"; 64 | handleError( StkError::WARNING ); return; 65 | } 66 | 67 | b_[0] = 1.0; 68 | b_[1] = -1.0; 69 | a_[0] = 1.0; // just in case 70 | a_[1] = -thePole; 71 | } 72 | 73 | } // stk namespace 74 | -------------------------------------------------------------------------------- /projects/effects/Makefile.in: -------------------------------------------------------------------------------- 1 | ### Do not edit -- Generated by 'configure --with-whatever' from Makefile.in 2 | ### STK effects Makefile - for various flavors of unix 3 | 4 | PROGRAMS = 5 | RM = /bin/rm 6 | SRC_PATH = ../../src 7 | OBJECT_PATH = @object_path@ 8 | vpath %.o $(OBJECT_PATH) 9 | 10 | OBJECTS = Stk.o Generator.o Envelope.o SineWave.o \ 11 | Filter.o Delay.o DelayL.o OnePole.o \ 12 | Effect.o Echo.o PitShift.o Chorus.o LentPitShift.o \ 13 | PRCRev.o JCRev.o NRev.o FreeVerb.o \ 14 | FileRead.o WvIn.o FileWvIn.o WaveLoop.o Skini.o Messager.o 15 | 16 | INCLUDE = @include@ 17 | ifeq ($(strip $(INCLUDE)), ) 18 | INCLUDE = ../../include 19 | endif 20 | vpath %.h $(INCLUDE) 21 | 22 | CC = @CXX@ 23 | DEFS = @CPPFLAGS@ 24 | DEFS += @byte_order@ 25 | CFLAGS = @CXXFLAGS@ 26 | CFLAGS += -I$(INCLUDE) -I$(INCLUDE)/../src/include 27 | LDFLAGS = @LDFLAGS@ 28 | LIBRARY = @LIBS@ 29 | 30 | REALTIME = @realtime@ 31 | ifeq ($(REALTIME),yes) 32 | PROGRAMS += effects 33 | OBJECTS += RtMidi.o RtAudio.o Thread.o Mutex.o Socket.o TcpServer.o @objects@ 34 | endif 35 | 36 | RAWWAVES = @rawwaves@ 37 | ifeq ($(strip $(RAWWAVES)), ) 38 | RAWWAVES = ../../rawwaves/ 39 | endif 40 | DEFS += -DRAWWAVE_PATH=\"$(RAWWAVES)\" 41 | 42 | %.o : $(SRC_PATH)/%.cpp $(OBJECT_PATH)/.placeholder 43 | $(CC) $(CFLAGS) $(DEFS) -c $(<) -o $(OBJECT_PATH)/$@ 44 | 45 | %.o : ../../src/include/%.cpp $(OBJECT_PATH)/.placeholder 46 | $(CC) $(CFLAGS) $(DEFS) -c $(<) -o $(OBJECT_PATH)/$@ 47 | 48 | all : $(PROGRAMS) 49 | 50 | $(OBJECT_PATH)/.placeholder: 51 | mkdir -vp $(OBJECT_PATH) 52 | touch $(OBJECT_PATH)/.placeholder 53 | 54 | effects: effects.cpp $(OBJECTS) 55 | $(CC) $(LDFLAGS) $(CFLAGS) $(DEFS) -o effects effects.cpp $(OBJECT_PATH)/*.o $(LIBRARY) 56 | 57 | libeffects: effects.cpp 58 | $(CC) $(LDFLAGS) $(CFLAGS) $(DEFS) -o effects effects.cpp -L../../src -lstk $(LIBRARY) 59 | 60 | $(OBJECTS) : Stk.h 61 | 62 | clean : 63 | $(RM) -f $(OBJECT_PATH)/*.o 64 | $(RM) -f $(PROGRAMS) *.exe 65 | $(RM) -fR *~ *.dSYM 66 | 67 | distclean: clean 68 | $(RM) Makefile 69 | 70 | strip : 71 | strip $(PROGRAMS) 72 | -------------------------------------------------------------------------------- /projects/demo/scores/simplgft.ski: -------------------------------------------------------------------------------- 1 | /* Howdy!! ToolKit96cpp SKINI File, Perry Cook */ 2 | NoteOn 0.000000 1 60 127.000000 3 | NoteOff 0.475011 1 60 63.500000 4 | NoteOn 0.025034 1 65 127.000000 5 | NoteOff 0.475011 1 65 63.500000 6 | NoteOn 0.025034 1 65 127.000000 7 | NoteOff 0.124989 1 65 63.500000 8 | NoteOn 0.124989 1 67 127.000000 9 | NoteOff 0.124989 1 67 63.500000 10 | NoteOn 0.124989 1 69 127.000000 11 | NoteOff 0.237506 1 69 63.500000 12 | NoteOn 0.012517 1 65 127.000000 13 | NoteOff 0.124989 1 65 63.500000 14 | NoteOn 0.124989 1 69 127.000000 15 | NoteOff 0.124989 1 69 63.500000 16 | NoteOn 0.124989 1 70 127.000000 17 | NoteOff 0.237506 1 70 63.500000 18 | NoteOn 0.012517 1 72 127.000000 19 | NoteOff 0.475011 1 72 63.500000 20 | NoteOn 0.025034 1 72 127.000000 21 | NoteOff 0.237506 1 72 63.500000 22 | NoteOn 0.012517 1 70 127.000000 23 | NoteOff 0.124989 1 70 63.500000 24 | NoteOn 0.124989 1 69 127.000000 25 | NoteOff 0.475011 1 69 63.500000 26 | NoteOn 0.025034 1 79 127.000000 27 | NoteOff 0.124989 1 79 63.500000 28 | NoteOn 0.124989 1 77 127.000000 29 | NoteOff 0.124989 1 77 63.500000 30 | NoteOn 0.124989 1 79 127.000000 31 | NoteOff 0.475011 1 79 63.500000 32 | NoteOn 0.025034 1 79 127.000000 33 | NoteOff 0.475011 1 79 63.500000 34 | NoteOn 0.025034 1 81 127.000000 35 | NoteOff 0.475011 1 81 63.500000 36 | NoteOn 0.025034 1 81 127.000000 37 | NoteOff 0.124989 1 81 63.500000 38 | NoteOn 0.124989 1 79 127.000000 39 | NoteOff 0.124989 1 79 63.500000 40 | NoteOn 0.124989 1 77 127.000000 41 | ControlChange 0.000000 1 1 32.000000 42 | NoteOff 0.475011 1 77 63.500000 43 | NoteOn 0.025034 1 65 127.000000 44 | NoteOff 0.475011 1 65 63.500000 45 | NoteOn 0.025034 1 41 127.000000 46 | NoteOff 0.950023 1 41 63.500000 47 | NoteOff 0.050023 1 41 63.500000 48 | -------------------------------------------------------------------------------- /projects/demo/scores/drumtest.ski: -------------------------------------------------------------------------------- 1 | /* Howdy!! ToolKit96cpp SKINI File, Perry Cook */ 2 | NoteOn 0.300000 1 36 10.000000 3 | NoteOn 0.300000 1 36 50.000000 4 | NoteOn 0.300000 1 36 90.000000 5 | NoteOn 0.300000 1 36 127.000000 6 | 7 | NoteOn 0.300000 1 38 10.000000 8 | NoteOn 0.300000 1 38 50.000000 9 | NoteOn 0.300000 1 38 90.000000 10 | NoteOn 0.300000 1 38 127.000000 11 | 12 | NoteOn 0.300000 1 41 10.000000 13 | NoteOn 0.300000 1 41 50.000000 14 | NoteOn 0.300000 1 41 90.000000 15 | NoteOn 0.300000 1 41 127.000000 16 | 17 | NoteOn 0.300000 1 42 10.000000 18 | NoteOn 0.300000 1 42 50.000000 19 | NoteOn 0.300000 1 42 90.000000 20 | NoteOn 0.300000 1 42 127.000000 21 | 22 | NoteOn 0.300000 1 45 10.000000 23 | NoteOn 0.300000 1 45 50.000000 24 | NoteOn 0.300000 1 45 90.000000 25 | NoteOn 0.300000 1 45 127.000000 26 | 27 | NoteOn 0.300000 1 46 10.000000 28 | NoteOn 0.300000 1 46 50.000000 29 | NoteOn 0.300000 1 46 90.000000 30 | NoteOn 0.300000 1 46 127.000000 31 | 32 | NoteOn 0.300000 1 48 10.000000 33 | NoteOn 0.300000 1 48 50.000000 34 | NoteOn 0.300000 1 48 90.000000 35 | NoteOn 0.300000 1 48 127.000000 36 | 37 | NoteOn 0.300000 1 49 10.000000 38 | NoteOn 0.300000 1 49 50.000000 39 | NoteOn 0.300000 1 49 90.000000 40 | NoteOn 0.300000 1 49 127.000000 41 | 42 | NoteOn 0.300000 1 54 10.000000 43 | NoteOn 0.300000 1 54 50.000000 44 | NoteOn 0.300000 1 54 90.000000 45 | NoteOn 0.300000 1 54 127.000000 46 | 47 | NoteOn 0.300000 1 56 10.000000 48 | NoteOn 0.300000 1 56 50.000000 49 | NoteOn 0.300000 1 56 90.000000 50 | NoteOn 0.300000 1 56 127.000000 51 | 52 | NoteOn 0.300000 1 57 10.000000 53 | NoteOn 0.300000 1 57 50.000000 54 | NoteOn 0.300000 1 57 90.000000 55 | NoteOn 0.300000 1 57 127.000000 56 | 57 | Exit 58 | -------------------------------------------------------------------------------- /docs/html/classstk_1_1ArdUdp-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Arduino STK: Member List 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 19 | 20 | 25 | 26 | 27 |
21 |
Arduino STK 22 |  4.6.2 23 |
24 |
28 |
29 | 30 | 31 | 35 |
36 |
37 |
38 |
stk::ArdUdp Member List
39 |
40 |
41 | 42 |

This is the complete list of members for stk::ArdUdp, including all inherited members.

43 |
44 | 45 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /projects/examples/rtsine.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {87559e16-c65d-4b0d-91cd-29436ae42e30} 6 | cpp;c;cxx;rc;def;r;odl;idl;hpj;bat 7 | 8 | 9 | {a99a0677-8a7f-47f7-b87e-d62f42dee98d} 10 | h;hpp;hxx;hm;inl 11 | 12 | 13 | {581f8bb4-6550-447c-b753-7d81c4273e09} 14 | ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | Source Files 32 | 33 | 34 | Source Files 35 | 36 | 37 | 38 | 39 | Header Files 40 | 41 | 42 | Header Files 43 | 44 | 45 | Header Files 46 | 47 | 48 | Header Files 49 | 50 | 51 | Header Files 52 | 53 | 54 | -------------------------------------------------------------------------------- /docs/html/structstk_1_1VFS__FD-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Arduino STK: Member List 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 19 | 20 | 25 | 26 | 27 |
21 |
Arduino STK 22 |  4.6.2 23 |
24 |
28 |
29 | 30 | 31 | 35 |
36 |
37 |
38 |
stk::VFS_FD Member List
39 |
40 |
41 | 42 |

This is the complete list of members for stk::VFS_FD, including all inherited members.

43 |
44 | 45 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /src/Envelope.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************/ 2 | /*! \class Envelope 3 | \brief STK linear line envelope class. 4 | 5 | This class implements a simple linear line envelope generator 6 | which is capable of ramping to an arbitrary target value by a 7 | specified \e rate. It also responds to simple \e keyOn and \e 8 | keyOff messages, ramping to 1.0 on keyOn and to 0.0 on keyOff. 9 | 10 | by Perry R. Cook and Gary P. Scavone, 1995--2019. 11 | */ 12 | /***************************************************/ 13 | 14 | #include "Envelope.h" 15 | 16 | namespace stk { 17 | 18 | Envelope :: Envelope( void ) : Generator() 19 | { 20 | target_ = 0.0; 21 | value_ = 0.0; 22 | rate_ = 0.001; 23 | state_ = 0; 24 | Stk::addSampleRateAlert( this ); 25 | } 26 | 27 | Envelope :: ~Envelope( void ) 28 | { 29 | Stk::removeSampleRateAlert( this ); 30 | } 31 | 32 | Envelope& Envelope :: operator= ( const Envelope& e ) 33 | { 34 | if ( this != &e ) { 35 | target_ = e.target_; 36 | value_ = e.value_; 37 | rate_ = e.rate_; 38 | state_ = e.state_; 39 | } 40 | 41 | return *this; 42 | } 43 | 44 | void Envelope :: sampleRateChanged( StkFloat newRate, StkFloat oldRate ) 45 | { 46 | if ( !ignoreSampleRateChange_ ) 47 | rate_ = oldRate * rate_ / newRate; 48 | } 49 | 50 | void Envelope :: setRate( StkFloat rate ) 51 | { 52 | if ( rate < 0.0f ) { 53 | oStream_ << "Envelope::setRate: argument must be >= 0.0!"; 54 | handleError( StkError::WARNING ); return; 55 | } 56 | 57 | rate_ = rate; 58 | } 59 | 60 | void Envelope :: setTime( StkFloat time ) 61 | { 62 | if ( time <= 0.0f ) { 63 | oStream_ << "Envelope::setTime: argument must be > 0.0!"; 64 | handleError( StkError::WARNING ); return; 65 | } 66 | 67 | rate_ = 1.0f / ( time * Stk::sampleRate() ); 68 | } 69 | 70 | void Envelope :: setTarget( StkFloat target ) 71 | { 72 | target_ = target; 73 | if ( value_ != target_ ) state_ = 1; 74 | } 75 | 76 | void Envelope :: setValue( StkFloat value ) 77 | { 78 | state_ = 0; 79 | target_ = value; 80 | value_ = value; 81 | lastFrame_[0] = value_; 82 | } 83 | 84 | } // stk namespace 85 | -------------------------------------------------------------------------------- /docs/html/pages.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Arduino STK: Related Pages 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | 19 | 20 | 25 | 26 | 27 |
21 |
Arduino STK 22 |  4.6.2 23 |
24 |
28 |
29 | 30 | 31 |
32 |
33 |
34 |
Related Pages
35 |
36 |
37 |
Here is a list of all related documentation pages:
42 |
43 | 44 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /src/Fir.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************/ 2 | /*! \class Fir 3 | \brief STK general finite impulse response filter class. 4 | 5 | This class provides a generic digital filter structure that can be 6 | used to implement FIR filters. For filters with feedback terms, 7 | the Iir class should be used. 8 | 9 | In particular, this class implements the standard difference 10 | equation: 11 | 12 | y[n] = b[0]*x[n] + ... + b[nb]*x[n-nb] 13 | 14 | The \e gain parameter is applied at the filter input and does not 15 | affect the coefficient values. The default gain value is 1.0. 16 | This structure results in one extra multiply per computed sample, 17 | but allows easy control of the overall filter gain. 18 | 19 | by Perry R. Cook and Gary P. Scavone, 1995--2019. 20 | */ 21 | /***************************************************/ 22 | 23 | #include "Fir.h" 24 | #include 25 | 26 | namespace stk { 27 | 28 | Fir :: Fir() 29 | { 30 | // The default constructor should setup for pass-through. 31 | b_.push_back( 1.0 ); 32 | 33 | inputs_.resize( 1, 1, 0.0 ); 34 | } 35 | 36 | Fir :: Fir( std::vector &coefficients ) 37 | { 38 | // Check the arguments. 39 | if ( coefficients.size() == 0 ) { 40 | oStream_ << "Fir: coefficient vector must have size > 0!"; 41 | handleError( StkError::FUNCTION_ARGUMENT ); 42 | } 43 | 44 | gain_ = 1.0; 45 | b_ = coefficients; 46 | 47 | inputs_.resize( b_.size(), 1, 0.0 ); 48 | this->clear(); 49 | } 50 | 51 | Fir :: ~Fir() 52 | { 53 | } 54 | 55 | void Fir :: setCoefficients( std::vector &coefficients, bool clearState ) 56 | { 57 | // Check the argument. 58 | if ( coefficients.size() == 0 ) { 59 | oStream_ << "Fir::setCoefficients: coefficient vector must have size > 0!"; 60 | handleError( StkError::FUNCTION_ARGUMENT ); 61 | } 62 | 63 | if ( b_.size() != coefficients.size() ) { 64 | b_ = coefficients; 65 | inputs_.resize( b_.size(), 1, 0.0 ); 66 | } 67 | else { 68 | for ( unsigned int i=0; iclear(); 72 | } 73 | 74 | } // stk namespace 75 | -------------------------------------------------------------------------------- /src/LentPitShift.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************/ 2 | /*! \class LentPitShift 3 | \brief Pitch shifter effect class based on the Lent algorithm. 4 | 5 | This class implements a pitch shifter using pitch 6 | tracking and sample windowing and shifting. 7 | 8 | by Francois Germain, 2009. 9 | */ 10 | /***************************************************/ 11 | 12 | #include "LentPitShift.h" 13 | 14 | namespace stk { 15 | 16 | LentPitShift::LentPitShift( StkFloat periodRatio, int tMax ) 17 | : inputFrames(0.,tMax,1), outputFrames(0.,tMax,1), ptrFrames(0), inputPtr(0), outputPtr(0.), tMax_(tMax), periodRatio_(periodRatio), zeroFrame(0.f, tMax, 1) 18 | { 19 | window = new StkFloat[2*tMax_]; // Allocation of the array for the hamming window 20 | threshold_ = 0.1; // Default threshold for pitch tracking 21 | 22 | dt = new StkFloat[tMax+1]; // Allocation of the euclidian distance coefficient array. The first one is never used. 23 | cumDt = new StkFloat[tMax+1]; // Allocation of the cumulative sum array 24 | cumDt[0] = 0.; // Initialization of the first coefficient of the cumulative sum 25 | dpt = new StkFloat[tMax+1]; // Allocation of the pitch tracking function coefficient array 26 | dpt[0] = 1.; // Initialization of the first coefficient of dpt which is always the same 27 | 28 | // Initialisation of the input and output delay lines 29 | inputLine_.setMaximumDelay( 3 * tMax_ ); 30 | // The delay is choosed such as the coefficients are not read before being finalised. 31 | outputLine_.setMaximumDelay( 3 * tMax_ ); 32 | outputLine_.setDelay( 3 * tMax_ ); 33 | 34 | //Initialization of the delay line of pitch tracking coefficients 35 | //coeffLine_ = new Delay[512]; 36 | //for(int i=0;i