ebook img

Developing Virtual Synthesizers with VCV Rack PDF

287 Pages·2020·15.021 MB·\287
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Developing Virtual Synthesizers with VCV Rack

Developing Virtual Synthesizers with VCV Rack Developing Virtual Synthesizers with VCV Rack takes the reader step by step through the process of developing synthesizer modules, beginning with the elementary and leading up to more engaging examples. Using the intuitive VCV Rack and its open-source C++ API, this book will guide even the most inexperienced reader to master efficient DSP coding to create oscillators, filters, and complex modules. Examining practical topics related to releasing plugins and managing complex graphical user interaction, with an intuitive study of signal processing theory specifically tailored for sound synthesis and virtual analog, this book covers everything from theory to practice. With exercises and example patches in each chapter, the reader will build a library of synthesizer modules that they can modify and expand. Supplemented by a companion website, this book is recommended reading for undergraduate and postgraduate students of audio engineering, music technology, computer science, electronics, and related courses; audio coding and do-it-yourself enthusiasts; and professionals looking for a quick guide to VCV Rack. VCV Rack is a free and open-source software available online. Leonardo Gabrielli, PhD, is a research fellow at the Department of Information Engineering, Università Politecnica delle Marche, Italy, where he lectures on music production and conducts research on physical modeling and deep neural audio processing. He collaborates with the music industry as a DSP developer and he is scientific director of Acusmatiq MATME. Developing Virtual Synthesizers with VCV Rack is a great read; an informative read; an inspiring read; an empowering read; an essential read! This fantastic textbook and comprehensive set of applied audio coding tutorials by Gabrielli will become the basis of many college courses and foun- dational courses of study for every electronic musician interested in knowing how things work under the hood. With that knowledge and understanding, they can code their own software synthesizers and DSP modules in VCV Virtual Eurorack format. Dr. Richard Boulanger, Professor of Electronic Production and Design, Berklee College of Music If, like me, you enjoy creating your own music tools, this book will help you bring your ideas to life inside the wonderful world of VCV Rack. Whether you are a beginner or an expert in DSP, you will learn something interesting or new. Dr. Leonardo Laguna Ruiz, Vult DSP Developing Virtual Synthesizers with VCV Rack Leonardo Gabrielli Firstpublished2020 byRoutledge 52VanderbiltAvenue,NewYork,NY10017 andbyRoutledge 2ParkSquare,MiltonPark,Abingdon,Oxon,OX144RN RoutledgeisanimprintoftheTaylor&FrancisGroup,aninformabusiness ©2020Taylor&Francis TherightofLeonardoGabriellitobeidentifiedasauthorofthisworkhasbeenassertedbyhimin accordancewithsections77and78oftheCopyright,DesignsandPatentsAct1988. Allrightsreserved.Nopartofthisbookmaybereprintedorreproducedorutilizedinanyformor byanyelectronic,mechanical,orothermeans,nowknownorhereafterinvented,including photocopyingandrecording,orinanyinformationstorageorretrievalsystem,withoutpermission inwritingfromthepublishers. Trademarknotice:Productorcorporatenamesmaybetrademarksorregisteredtrademarks,and areusedonlyforidentificationandexplanationwithoutintenttoinfringe. LibraryofCongressCataloging-in-PublicationData Names:Gabrielli,Leonardo,author. Title:DevelopingvirtualsynthesizerswithVCVRack/LeonardoGabrielli. Description:NewYork,NY:Routledge,2020.|Includesbibliographicalreferencesandindex. Identifiers:LCCN2019039167(print)|LCCN2019039168(ebook)|ISBN9780367077730 (paperback)|ISBN9780367077747(hardback)|ISBN9780429022760(ebook)|ISBN 9780429663321(epub)|ISBN9780429660603(mobi)|ISBN9780429666049(adobepdf) Subjects:LCSH:VCVRack.|Softwaresynthesizers.|Computersoundprocessing.|Sound studios–Equipmentandsupplies. Classification:LCCML74.4.V35G3252020(print)|LCCML74.4.V35(ebook)| DDC786.7/4134–dc23 LCrecordavailableathttps://lccn.loc.gov/2019039167 LCebookrecordavailableathttps://lccn.loc.gov/2019039168 ISBN:978-0-367-07774-7(hbk) ISBN:978-0-367-07773-0(pbk) ISBN:978-0-429-02276-0(ebk) TypesetinTimesNewRoman bySwales&Willis,Exeter,Devon,UK Visitthecompanionwebsite:www.leonardo-gabrielli.info/vcv-book LightbulbiconbyPettyconfromPixabay Contents Preface..........................................................................................................................x Acknowledgments........................................................................................................xiii Chapter1: ModularSynthesis:Theory..............................................................................1 1.1 WhyModularSynthesis?............................................................................................................1 1.2 AnHistoricalPerspective............................................................................................................2 1.2.1 TheEarlyElectronicandElectroacousticMusicStudios................................................2 1.2.2 TheBirthandEvolutionofModularSynthesizers..........................................................4 1.2.3 TheAdventofaStandard................................................................................................6 1.2.4 TheSoftwareShift...........................................................................................................7 1.3 ModularSynthesisBasics...........................................................................................................8 1.3.1 SoundSources..................................................................................................................8 1.3.2 TimbreModificationandSpectralProcessing...............................................................10 1.3.3 Envelope,Dynamics,Articulation.................................................................................12 1.3.4 “FireatWill,”orinShort:Sequencers..........................................................................13 1.3.5 UtilityModules..............................................................................................................15 Chapter2: ElementsofSignalProcessingforSynthesis.....................................................16 2.1 Continuous-TimeSignals........................................................................................................16 2.2 Discrete-TimeSignals.............................................................................................................18 2.3 Discrete-TimeSystems...........................................................................................................22 2.4 TheFrequencyDomain...........................................................................................................27 2.4.1 DiscreteFourierSeries................................................................................................29 2.4.2 DiscreteFourierTransform.........................................................................................32 2.4.3 PropertiesoftheDiscreteFourierTransform..............................................................35 2.4.4 AgainonLTISystems:TheFrequencyResponse......................................................36 2.4.5 ComputationalComplexityandtheFastFourierTransform.......................................36 2.4.6 Short-TimeFourierTransform....................................................................................37 2.5 OnceAgainonLTISystems:Filters.......................................................................................38 2.6 SpecialLTISystems:Discrete-TimeDifferentiatorandIntegrator........................................40 2.7 AnalogtoDigitalandBack.....................................................................................................42 2.8 SpectralContentofTypicalOscillatorWaveforms................................................................46 2.9 UnderstandingAliasing...........................................................................................................49 v vi Contents 2.10 Filters:ThePracticalSide.......................................................................................................52 2.11 NonlinearProcessing..............................................................................................................54 2.11.1 Waveshaping..............................................................................................................54 2.11.2 AmplitudeandRingModulation...............................................................................58 2.11.3 FrequencyModulation...............................................................................................60 2.12 RandomSignals......................................................................................................................63 2.13 NumericalIssuesandHintsonCoding...................................................................................69 2.14 ConcludingRemarks...............................................................................................................71 Chapter3: VCVRackBasics.........................................................................................74 3.1 OverviewoftheSystem............................................................................................................75 3.2 AnatomyofaModule...............................................................................................................76 3.3 ContextMenus..........................................................................................................................77 3.4 CoreModules............................................................................................................................78 3.4.1 AUDIO-8andAUDIO-16.............................................................................................78 3.4.2 MIDI-CV........................................................................................................................78 3.4.3 MIDI-CC........................................................................................................................79 3.4.4 MIDI-GATE...................................................................................................................80 3.4.5 MIDI-MAP.....................................................................................................................80 3.4.6 CV-MIDI,CV-CC,CV-GATE.......................................................................................80 3.5 FundamentalModules...............................................................................................................80 3.6 QuickPatches............................................................................................................................83 3.6.1 AudioandMIDIRouting...............................................................................................83 3.6.2 EastCoastSynthesisinOneMinute..............................................................................84 3.6.3 UsingtheSCOPE...........................................................................................................85 3.6.4 ObservingAliasing........................................................................................................88 3.6.5 UsingPolyphonicCables...............................................................................................88 Chapter4: DevelopingwithVCVRack...........................................................................91 4.1 ComparisonwithOtherPlatforms............................................................................................92 4.1.1 AudioProcessing...........................................................................................................92 4.1.2 Scheduling......................................................................................................................94 4.1.3 PolyphonicCables..........................................................................................................95 4.1.4 ExpanderModules.........................................................................................................95 4.1.5 SimplicityandObject-OrientedProgramming..............................................................95 4.2 Plugins:FilesandDirectories...................................................................................................96 4.3 Plugins:SoftwareComponents.................................................................................................97 4.4 SettingUpYourSystemforCoding.........................................................................................99 4.4.1 Linux..............................................................................................................................99 4.4.2 Windows......................................................................................................................100 4.4.3 macOS..........................................................................................................................100 4.4.4 BuildingVCVRackfromSources..............................................................................100 4.5 BuildingYourFirst“HelloWorld”Module...........................................................................102 Contents vii 4.5.1 BuildandRun..............................................................................................................102 4.5.2 StructureoftheSourceFiles........................................................................................102 4.6 AdoptinganIDEforDevelopment:Eclipse...........................................................................106 4.6.1 Importinga“MakefileProject”....................................................................................107 4.6.2 BuildingtheProjectInsideEclipse..............................................................................108 Chapter5: TheGraphicalUserInterface:AQuickIntroduction.......................................110 5.1 GeneratingSVGFileswithInkscape......................................................................................110 5.1.1 CreatingthePanelandtheBackground.......................................................................111 5.1.2 CreatingthePanelandtheBackground.......................................................................112 5.2 BaseWidgetObjectsforKnobs,PortsandSwitches.............................................................113 5.2.1 AutomaticallyPlacingComponents.............................................................................115 Chapter6: Let’sStartProgramming:TheEasyOnes.....................................................119 6.1 CreatingaNewPluginfromScratch,UsingtheHelperScript..............................................119 6.2 ComparatorModule................................................................................................................120 6.3 MuxingandDemuxing...........................................................................................................125 6.4 Knobs:Displaying,Mapping,andComputingTheirValues..................................................129 6.5 ClockGenerator......................................................................................................................131 6.6 SequencerModule...................................................................................................................137 6.7 BinaryFrequencyDivider.......................................................................................................140 6.8 RandomModule......................................................................................................................143 6.9 ToRecap:ExercisePatches....................................................................................................147 6.9.1 CreatingaBernoulliDistributionandBernoulliGate.................................................147 6.9.2 Polyrhythms.................................................................................................................147 Chapter7: GettingSerious:DSP“Classroom”Modules.................................................148 7.1 HandlingPolyphonyProperly.................................................................................................148 7.2 LinearEnvelopeGenerator.....................................................................................................150 7.3 ExponentialEnvelopeGenerator............................................................................................153 7.3.1 AVirtualAnalogRCFilter..........................................................................................154 7.3.2 ImplementationoftheExponentialEnvelopeGenerator.............................................155 7.4 EnvelopeFollower..................................................................................................................158 7.4.1 ModellingaDiodeEnvelopeFollower........................................................................159 7.4.2 ImplementationoftheEnvelopeFollower..................................................................163 7.5 MultimodeState-VariableFilter.............................................................................................165 7.5.1 ADiscrete-TimeModeloftheMultimodeState-VariableFilter.................................165 7.5.2 ImplementationoftheState-VariableFilter.................................................................168 7.6 PolyphonicFilter.....................................................................................................................171 7.6.1 ToRecap:ExercisewithPatches.................................................................................173 7.6.1.1 SimpleSnareSoundGeneration.....................................................................174 7.6.1.2 Auto-WahEffect.............................................................................................174 7.6.1.3 CreatingaStepFilter......................................................................................174 7.6.1.4 TheChemist’sLab,AkaPolyphonicNoiseFilters........................................174 viii Contents Chapter8: CrunchingNumbers:AdvancedDSPModules................................................175 8.1 ModalSynthesis......................................................................................................................175 8.1.1 ModalSynthesisPrinciples..........................................................................................176 8.1.2 AState-VariableFilterBank........................................................................................177 8.1.3 The“Modal”Module...................................................................................................177 8.1.4 AddingContextMenuOptions....................................................................................180 8.1.5 ComputationalCost......................................................................................................183 8.2 VirtualAnalogOscillatorwithLimitedAliasing...................................................................184 8.2.1 TrivialOscillators.........................................................................................................184 8.2.2 Oversampling:TheEasySolution...............................................................................186 8.2.3 ImplementingaTrivialOscillatorwithOversampling................................................188 8.2.4 DifferentiatedParabolicWaveformandItsExtensions...............................................192 8.2.5 DifferentiatedParabolicWaveformImplementation...................................................196 8.2.6 ComputationalCostandAliasing................................................................................203 8.2.7 PolyphonicOscillatorModule.....................................................................................204 8.3 Wavefolding............................................................................................................................206 8.3.1 TrivialFoldbackAlgorithm.........................................................................................208 8.3.2 AntiderivativeAnti-AliasingMethod..........................................................................208 8.3.3 WavefolderModuleImplementation...........................................................................210 8.4 ToRecap:ExercisewithPatches............................................................................................214 8.4.1 AModalSynthesisPatch.............................................................................................214 8.4.2 EastCoastClassic........................................................................................................214 8.4.3 WestCoastMonoVoice...............................................................................................215 8.4.4 JunttiWaveshaper........................................................................................................215 Chapter9: TheGraphicalUserInterface:CreatingCustomWidgets................................217 9.1 TheRenderingLibrary:NanoVG...........................................................................................217 9.2 CustomWidgetsCreation.......................................................................................................218 9.2.1 CustomKnobsandButtons.........................................................................................219 9.2.2 DrawingText................................................................................................................222 9.3 AnInteractiveWidget.............................................................................................................225 Chapter10: AdditionalTopics.....................................................................................233 10.1 DebuggingtheCode..............................................................................................................233 10.1.1 RunningaDebugSession........................................................................................234 10.1.2 DebuggingaSegmentationFault............................................................................236 10.1.3 DevelopmentMode.................................................................................................237 10.1.4 DebuggingwiththeEclipseIDE.............................................................................237 10.1.5 OtherDebuggingMethods......................................................................................239 10.2 Optimization..........................................................................................................................241 10.2.1 TableLookupforTranscendentalFunctions...........................................................242 10.2.2 SineApproximationbyTableLookup....................................................................245 10.2.3 QuadraticApproximationofSine............................................................................245 10.2.4 TheChamberlinResonatorasaSineOscillator......................................................246 Contents ix 10.2.5 ReducingtheGUIProcessingBurden.....................................................................247 10.3 DevelopingExpanderModules.............................................................................................247 10.4 AddingFactoryPresets.........................................................................................................250 10.5 StoringandRecallingModuleInformationthroughJSON..................................................251 10.5.1 StoringandRecallingJSONDataforAModalGUI................................................253 10.6 VersioningtheCodeandManagingaGitRepository..........................................................256 10.7 GettingintotheThird-PartyPluginList...............................................................................258 10.8 MakingaRevenueoutofCoding.........................................................................................259 10.8.1 TheVCVStore........................................................................................................259 10.8.2 Donations.................................................................................................................259 10.8.3 BlankPanels............................................................................................................260 Chapter11: AfterReadingThisBook...........................................................................261 11.1 ForkingtheABCCollection.................................................................................................261 11.2 LearnMoreaboutVirtualAnalogAlgorithms......................................................................262 11.3 ExperimentwithNovelDigitalAlgorithms..........................................................................262 11.4 BuildaHybridHardware/SoftwareModularRack..............................................................263 Bibliography 266 Index 270

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.