├── .clang-format ├── CMakeLists.txt ├── CMakePresets.json ├── COPYING ├── ChangeLog ├── README.md ├── extras ├── com.giadamusic.Giada.desktop ├── com.giadamusic.Giada.metainfo.xml ├── giada-logo.png ├── giada-logo.svg ├── giada-logotype.png └── giada.icns ├── scripts └── create_source_tarball.sh ├── src ├── core │ ├── actions │ │ ├── action.h │ │ ├── actionFactory.cpp │ │ ├── actionFactory.h │ │ ├── actionRecorder.cpp │ │ └── actionRecorder.h │ ├── api │ │ ├── IOApi.cpp │ │ ├── IOApi.h │ │ ├── actionEditorApi.cpp │ │ ├── actionEditorApi.h │ │ ├── channelsApi.cpp │ │ ├── channelsApi.h │ │ ├── configApi.cpp │ │ ├── configApi.h │ │ ├── mainApi.cpp │ │ ├── mainApi.h │ │ ├── pluginsApi.cpp │ │ ├── pluginsApi.h │ │ ├── sampleEditorApi.cpp │ │ ├── sampleEditorApi.h │ │ ├── storageApi.cpp │ │ └── storageApi.h │ ├── channels │ │ ├── channel.cpp │ │ ├── channel.h │ │ ├── channelFactory.cpp │ │ ├── channelFactory.h │ │ ├── channelManager.cpp │ │ ├── channelManager.h │ │ ├── channelShared.cpp │ │ ├── channelShared.h │ │ ├── midiChannel.cpp │ │ ├── midiChannel.h │ │ ├── midiInput.cpp │ │ ├── midiInput.h │ │ ├── midiLightning.cpp │ │ ├── midiLightning.h │ │ ├── sampleChannel.cpp │ │ └── sampleChannel.h │ ├── conf.h │ ├── confFactory.cpp │ ├── confFactory.h │ ├── const.h │ ├── deepPtr.h │ ├── engine.cpp │ ├── engine.h │ ├── eventDispatcher.cpp │ ├── eventDispatcher.h │ ├── idManager.cpp │ ├── idManager.h │ ├── init.cpp │ ├── init.h │ ├── jackSynchronizer.cpp │ ├── jackSynchronizer.h │ ├── jackTransport.cpp │ ├── jackTransport.h │ ├── kernelAudio.cpp │ ├── kernelAudio.h │ ├── kernelMidi.cpp │ ├── kernelMidi.h │ ├── metronome.cpp │ ├── metronome.h │ ├── midiDispatcher.cpp │ ├── midiDispatcher.h │ ├── midiEvent.cpp │ ├── midiEvent.h │ ├── midiLearnParam.cpp │ ├── midiLearnParam.h │ ├── midiMapper.cpp │ ├── midiMapper.h │ ├── midiSynchronizer.cpp │ ├── midiSynchronizer.h │ ├── mixer.cpp │ ├── mixer.h │ ├── model │ │ ├── actions.cpp │ │ ├── actions.h │ │ ├── behaviors.h │ │ ├── channels.cpp │ │ ├── channels.h │ │ ├── document.cpp │ │ ├── document.h │ │ ├── kernelAudio.h │ │ ├── kernelMidi.h │ │ ├── loadState.cpp │ │ ├── loadState.h │ │ ├── midiIn.h │ │ ├── mixer.cpp │ │ ├── mixer.h │ │ ├── model.cpp │ │ ├── model.h │ │ ├── sequencer.cpp │ │ ├── sequencer.h │ │ ├── shared.cpp │ │ ├── shared.h │ │ ├── sharedLock.cpp │ │ ├── sharedLock.h │ │ ├── track.cpp │ │ ├── track.h │ │ ├── tracks.cpp │ │ ├── tracks.h │ │ └── types.h │ ├── patch.cpp │ ├── patch.h │ ├── patchFactory.cpp │ ├── patchFactory.h │ ├── plugins │ │ ├── plugin.cpp │ │ ├── plugin.h │ │ ├── pluginFactory.cpp │ │ ├── pluginFactory.h │ │ ├── pluginHost.cpp │ │ ├── pluginHost.h │ │ ├── pluginManager.cpp │ │ ├── pluginManager.h │ │ ├── pluginState.cpp │ │ └── pluginState.h │ ├── quantizer.cpp │ ├── quantizer.h │ ├── recorder.cpp │ ├── recorder.h │ ├── rendering │ │ ├── midiAdvance.cpp │ │ ├── midiAdvance.h │ │ ├── midiOutput.cpp │ │ ├── midiOutput.h │ │ ├── midiReactions.cpp │ │ ├── midiReactions.h │ │ ├── pluginRendering.cpp │ │ ├── pluginRendering.h │ │ ├── reactor.cpp │ │ ├── reactor.h │ │ ├── renderer.cpp │ │ ├── renderer.h │ │ ├── sampleAdvance.cpp │ │ ├── sampleAdvance.h │ │ ├── sampleReactions.cpp │ │ ├── sampleReactions.h │ │ ├── sampleRendering.cpp │ │ └── sampleRendering.h │ ├── resampler.cpp │ ├── resampler.h │ ├── ringBuffer.h │ ├── sequencer.cpp │ ├── sequencer.h │ ├── types.h │ ├── wave.cpp │ ├── wave.h │ ├── waveFactory.cpp │ ├── waveFactory.h │ ├── waveFx.cpp │ ├── waveFx.h │ ├── weakAtomic.h │ ├── worker.cpp │ └── worker.h ├── ext │ ├── giada.ico │ ├── resource.h │ └── resource.rc ├── glue │ ├── actionEditor.cpp │ ├── actionEditor.h │ ├── channel.cpp │ ├── channel.h │ ├── config.cpp │ ├── config.h │ ├── io.cpp │ ├── io.h │ ├── layout.cpp │ ├── layout.h │ ├── main.cpp │ ├── main.h │ ├── plugin.cpp │ ├── plugin.h │ ├── sampleEditor.cpp │ ├── sampleEditor.h │ ├── storage.cpp │ └── storage.h ├── gui │ ├── dialogs │ │ ├── about.cpp │ │ ├── about.h │ │ ├── actionEditor │ │ │ ├── baseActionEditor.cpp │ │ │ ├── baseActionEditor.h │ │ │ ├── midiActionEditor.cpp │ │ │ ├── midiActionEditor.h │ │ │ ├── sampleActionEditor.cpp │ │ │ └── sampleActionEditor.h │ │ ├── beatsInput.cpp │ │ ├── beatsInput.h │ │ ├── bpmInput.cpp │ │ ├── bpmInput.h │ │ ├── browser │ │ │ ├── browserBase.cpp │ │ │ ├── browserBase.h │ │ │ ├── browserDir.cpp │ │ │ ├── browserDir.h │ │ │ ├── browserLoad.cpp │ │ │ ├── browserLoad.h │ │ │ ├── browserSave.cpp │ │ │ └── browserSave.h │ │ ├── channelNameInput.cpp │ │ ├── channelNameInput.h │ │ ├── channelRouting.cpp │ │ ├── channelRouting.h │ │ ├── config.cpp │ │ ├── config.h │ │ ├── keyGrabber.cpp │ │ ├── keyGrabber.h │ │ ├── mainWindow.cpp │ │ ├── mainWindow.h │ │ ├── midiIO │ │ │ ├── midiInputBase.cpp │ │ │ ├── midiInputBase.h │ │ │ ├── midiInputChannel.cpp │ │ │ ├── midiInputChannel.h │ │ │ ├── midiInputMaster.cpp │ │ │ ├── midiInputMaster.h │ │ │ ├── midiOutputBase.cpp │ │ │ ├── midiOutputBase.h │ │ │ ├── midiOutputMidiCh.cpp │ │ │ ├── midiOutputMidiCh.h │ │ │ ├── midiOutputSampleCh.cpp │ │ │ └── midiOutputSampleCh.h │ │ ├── missingAssets.cpp │ │ ├── missingAssets.h │ │ ├── pluginChooser.cpp │ │ ├── pluginChooser.h │ │ ├── pluginList.cpp │ │ ├── pluginList.h │ │ ├── pluginWindow.cpp │ │ ├── pluginWindow.h │ │ ├── pluginWindowGUI.cpp │ │ ├── pluginWindowGUI.h │ │ ├── progress.cpp │ │ ├── progress.h │ │ ├── sampleEditor.cpp │ │ ├── sampleEditor.h │ │ ├── warnings.cpp │ │ ├── warnings.h │ │ ├── window.cpp │ │ └── window.h │ ├── dispatcher.cpp │ ├── dispatcher.h │ ├── drawing.cpp │ ├── drawing.h │ ├── elems │ │ ├── actionEditor │ │ │ ├── baseAction.cpp │ │ │ ├── baseAction.h │ │ │ ├── baseActionEditor.cpp │ │ │ ├── baseActionEditor.h │ │ │ ├── envelopePoint.cpp │ │ │ ├── envelopePoint.h │ │ │ ├── gridTool.cpp │ │ │ ├── gridTool.h │ │ │ ├── legend.cpp │ │ │ ├── legend.h │ │ │ ├── pianoItem.cpp │ │ │ ├── pianoItem.h │ │ │ ├── pianoRoll.cpp │ │ │ ├── pianoRoll.h │ │ │ ├── pianoRollLegend.cpp │ │ │ ├── pianoRollLegend.h │ │ │ ├── sampleAction.cpp │ │ │ ├── sampleAction.h │ │ │ ├── sampleActionEditor.cpp │ │ │ ├── sampleActionEditor.h │ │ │ ├── splitScroll.cpp │ │ │ ├── splitScroll.h │ │ │ ├── velocityEditor.cpp │ │ │ └── velocityEditor.h │ │ ├── basics │ │ │ ├── box.cpp │ │ │ ├── box.h │ │ │ ├── boxtypes.cpp │ │ │ ├── boxtypes.h │ │ │ ├── browser.cpp │ │ │ ├── browser.h │ │ │ ├── button.cpp │ │ │ ├── button.h │ │ │ ├── check.cpp │ │ │ ├── check.h │ │ │ ├── choice.cpp │ │ │ ├── choice.h │ │ │ ├── dial.cpp │ │ │ ├── dial.h │ │ │ ├── flex.cpp │ │ │ ├── flex.h │ │ │ ├── flexResizable.cpp │ │ │ ├── flexResizable.h │ │ │ ├── group.cpp │ │ │ ├── group.h │ │ │ ├── imageButton.cpp │ │ │ ├── imageButton.h │ │ │ ├── input.cpp │ │ │ ├── input.h │ │ │ ├── liquidScroll.cpp │ │ │ ├── liquidScroll.h │ │ │ ├── menu.cpp │ │ │ ├── menu.h │ │ │ ├── pack.cpp │ │ │ ├── pack.h │ │ │ ├── progress.cpp │ │ │ ├── progress.h │ │ │ ├── resizerBar.cpp │ │ │ ├── resizerBar.h │ │ │ ├── scroll.cpp │ │ │ ├── scroll.h │ │ │ ├── scrollPack.cpp │ │ │ ├── scrollPack.h │ │ │ ├── scrollbar.cpp │ │ │ ├── scrollbar.h │ │ │ ├── slider.cpp │ │ │ ├── slider.h │ │ │ ├── table.cpp │ │ │ ├── table.h │ │ │ ├── tabs.cpp │ │ │ ├── tabs.h │ │ │ ├── textButton.cpp │ │ │ └── textButton.h │ │ ├── config │ │ │ ├── stringMenu.cpp │ │ │ ├── stringMenu.h │ │ │ ├── tabAudio.cpp │ │ │ ├── tabAudio.h │ │ │ ├── tabBehaviors.cpp │ │ │ ├── tabBehaviors.h │ │ │ ├── tabBindings.cpp │ │ │ ├── tabBindings.h │ │ │ ├── tabMidi.cpp │ │ │ ├── tabMidi.h │ │ │ ├── tabMisc.cpp │ │ │ ├── tabMisc.h │ │ │ ├── tabPlugins.cpp │ │ │ └── tabPlugins.h │ │ ├── fileBrowser.cpp │ │ ├── fileBrowser.h │ │ ├── keyBinder.cpp │ │ ├── keyBinder.h │ │ ├── mainWindow │ │ │ ├── keyboard │ │ │ │ ├── channel.cpp │ │ │ │ ├── channel.h │ │ │ │ ├── channelButton.cpp │ │ │ │ ├── channelButton.h │ │ │ │ ├── channelProgress.cpp │ │ │ │ ├── channelProgress.h │ │ │ │ ├── groupChannel.cpp │ │ │ │ ├── groupChannel.h │ │ │ │ ├── groupChannelButton.cpp │ │ │ │ ├── groupChannelButton.h │ │ │ │ ├── keyboard.cpp │ │ │ │ ├── keyboard.h │ │ │ │ ├── midiChannel.cpp │ │ │ │ ├── midiChannel.h │ │ │ │ ├── midiChannelButton.cpp │ │ │ │ ├── midiChannelButton.h │ │ │ │ ├── sampleChannel.cpp │ │ │ │ ├── sampleChannel.h │ │ │ │ ├── sampleChannelButton.cpp │ │ │ │ ├── sampleChannelButton.h │ │ │ │ ├── sampleChannelMode.cpp │ │ │ │ ├── sampleChannelMode.h │ │ │ │ ├── track.cpp │ │ │ │ └── track.h │ │ │ ├── mainInput.cpp │ │ │ ├── mainInput.h │ │ │ ├── mainMenu.cpp │ │ │ ├── mainMenu.h │ │ │ ├── mainOutput.cpp │ │ │ ├── mainOutput.h │ │ │ ├── mainTimer.cpp │ │ │ ├── mainTimer.h │ │ │ ├── mainTransport.cpp │ │ │ ├── mainTransport.h │ │ │ ├── sequencer.cpp │ │ │ └── sequencer.h │ │ ├── midiActivity.cpp │ │ ├── midiActivity.h │ │ ├── midiIO │ │ │ ├── midiLearner.cpp │ │ │ ├── midiLearner.h │ │ │ ├── midiLearnerPack.cpp │ │ │ └── midiLearnerPack.h │ │ ├── panTool.cpp │ │ ├── panTool.h │ │ ├── plugin │ │ │ ├── pluginBrowser.cpp │ │ │ ├── pluginBrowser.h │ │ │ ├── pluginElement.cpp │ │ │ ├── pluginElement.h │ │ │ ├── pluginParameter.cpp │ │ │ └── pluginParameter.h │ │ ├── sampleEditor │ │ │ ├── pitchTool.cpp │ │ │ ├── pitchTool.h │ │ │ ├── rangeTool.cpp │ │ │ ├── rangeTool.h │ │ │ ├── shiftTool.cpp │ │ │ ├── shiftTool.h │ │ │ ├── waveTools.cpp │ │ │ ├── waveTools.h │ │ │ ├── waveform.cpp │ │ │ └── waveform.h │ │ ├── soundMeter.cpp │ │ ├── soundMeter.h │ │ ├── volumeTool.cpp │ │ └── volumeTool.h │ ├── graphics.h │ ├── langMapper.cpp │ ├── langMapper.h │ ├── model.cpp │ ├── model.h │ ├── types.h │ ├── ui.cpp │ ├── ui.h │ ├── updater.cpp │ └── updater.h ├── main.cpp ├── mapper.cpp ├── mapper.h └── utils │ ├── cocoa.h │ ├── cocoa.mm │ ├── fs.cpp │ ├── fs.h │ ├── gui.cpp │ ├── gui.h │ ├── log.cpp │ ├── log.h │ ├── math.cpp │ ├── math.h │ ├── string.cpp │ ├── string.h │ ├── time.cpp │ ├── time.h │ ├── vector.h │ ├── ver.cpp │ └── ver.h ├── tests ├── actionRecorder.cpp ├── channelFactory.cpp ├── main.cpp ├── midiEvent.cpp ├── midiLightning.cpp ├── mocks │ └── kernelMidiMock.h ├── patch.cpp ├── resources │ └── test.wav ├── sampleRendering.cpp ├── utils.cpp ├── wave.cpp ├── waveFactory.cpp ├── waveFx.cpp └── waveReading.cpp └── vcpkg.json /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | BasedOnStyle: Microsoft 3 | AccessModifierOffset: -4 4 | AlignAfterOpenBracket: 'false' 5 | AlignConsecutiveAssignments: 'true' 6 | AlignConsecutiveDeclarations: 'true' 7 | AllowShortFunctionsOnASingleLine: All 8 | BreakBeforeBraces: Allman 9 | BreakConstructorInitializers: BeforeComma 10 | ColumnLimit: 0 11 | ConstructorInitializerIndentWidth: '0' 12 | IndentWrappedFunctionNames: 'false' 13 | Language: Cpp 14 | NamespaceIndentation: None 15 | PointerAlignment: Left 16 | UseTab: ForIndentation 17 | LambdaBodyIndentation: OuterScope 18 | -------------------------------------------------------------------------------- /extras/com.giadamusic.Giada.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Type=Application 4 | Name=Giada 5 | GenericName=Drum machine and loop sequencer 6 | GenericName[de]=Drum Maschine und Loop Sequenzer 7 | GenericName[es]=Caja de ritmos y secuenciador de loops 8 | GenericName[fr]=Boîte à rythme et séquenceur de boucle 9 | Comment=Drum machine and loop sequencer 10 | Comment[de]=Drum Maschine und Loop Sequenzer 11 | Comment[es]=Caja de ritmos y secuenciador de loops 12 | Comment[fr]=Boîte à rythme et séquenceur de boucle 13 | Exec=giada %f 14 | Terminal=false 15 | Icon=giada 16 | Categories=Music;AudioVideo;Audio;Midi;X-Digital_Processing;X-Jack;X-MIDI; 17 | Keywords=midi;jackd;alsa;pulse;audio;sound;loop; 18 | -------------------------------------------------------------------------------- /extras/com.giadamusic.Giada.metainfo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | com.giadamusic.Giada 5 | CC0 6 | GPL-2.0+ 7 | Giada 8 | Your hardcore loop machine 9 | 10 |

Giada is an open source, minimalistic and hardcore music production tool. Designed for DJs, live performers and electronic musicians.

11 |
12 | Monocasual Laboratories 13 | 14 | com.giadamusic.Giada.desktop 15 | 16 | 17 | https://giadamusic.com/images/giada-canvas.png 18 | Giada official screenshot 19 | 20 | 21 | 22 | 23 | 24 | 25 | giadaloopmachine_AT_gmail.com 26 | https://www.giadamusic.com/ 27 | https://github.com/monocasual/giada/discussions 28 |
29 | -------------------------------------------------------------------------------- /extras/giada-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monocasual/giada/e495a0224a31b94da752d363f5e9207979bfdea5/extras/giada-logo.png -------------------------------------------------------------------------------- /extras/giada-logotype.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monocasual/giada/e495a0224a31b94da752d363f5e9207979bfdea5/extras/giada-logotype.png -------------------------------------------------------------------------------- /extras/giada.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monocasual/giada/e495a0224a31b94da752d363f5e9207979bfdea5/extras/giada.icns -------------------------------------------------------------------------------- /src/core/actions/action.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_ACTION_H 28 | #define G_ACTION_H 29 | 30 | #include "src/core/midiEvent.h" 31 | #include "src/core/types.h" 32 | 33 | namespace giada::m 34 | { 35 | struct Action 36 | { 37 | ID id = 0; // Invalid 38 | ID channelId; 39 | Frame frame; 40 | MidiEvent event; 41 | ID pluginId = -1; 42 | int pluginParam = -1; 43 | ID prevId = 0; 44 | ID nextId = 0; 45 | 46 | bool isValid() const 47 | { 48 | return id != 0; 49 | } 50 | 51 | bool isVolumeEnvelope() const 52 | { 53 | return event.getStatus() == MidiEvent::CHANNEL_CC && pluginId == -1; 54 | } 55 | }; 56 | } // namespace giada::m 57 | 58 | #endif -------------------------------------------------------------------------------- /src/core/channels/channelShared.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "core/channels/channelShared.h" 28 | 29 | namespace giada::m 30 | { 31 | ChannelShared::ChannelShared(ID id, Frame bufferSize) 32 | : id(id) 33 | , audioBuffer(bufferSize, G_MAX_IO_CHANS) 34 | { 35 | } 36 | 37 | /* -------------------------------------------------------------------------- */ 38 | 39 | bool ChannelShared::isReadingActions() const 40 | { 41 | const ChannelStatus status = recStatus.load(); 42 | const bool read = readActions.load(); 43 | return read && (status == ChannelStatus::PLAY || status == ChannelStatus::ENDING); 44 | } 45 | 46 | /* -------------------------------------------------------------------------- */ 47 | 48 | void ChannelShared::setBufferSize(int bufferSize) 49 | { 50 | audioBuffer.alloc(bufferSize, audioBuffer.countChannels()); 51 | } 52 | } // namespace giada::m -------------------------------------------------------------------------------- /src/core/channels/midiChannel.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "core/channels/midiChannel.h" 28 | 29 | namespace giada::m 30 | { 31 | MidiChannel::MidiChannel() 32 | : outputEnabled(false) 33 | , outputFilter(0) 34 | { 35 | } 36 | 37 | /* -------------------------------------------------------------------------- */ 38 | 39 | MidiChannel::MidiChannel(const Patch::Channel& p) 40 | : outputEnabled(p.midiOut) 41 | , outputFilter(p.midiOutChan) 42 | { 43 | } 44 | } // namespace giada::m 45 | -------------------------------------------------------------------------------- /src/core/channels/midiChannel.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_MIDI_CHANNEL_H 28 | #define G_MIDI_CHANNEL_H 29 | 30 | #include "core/patch.h" 31 | 32 | namespace giada::m 33 | { 34 | class MidiChannel final 35 | { 36 | public: 37 | MidiChannel(); 38 | MidiChannel(const Patch::Channel&); 39 | 40 | /* outputEnabled 41 | Tells whether MIDI output is enabled or not. */ 42 | 43 | bool outputEnabled; 44 | 45 | /* outputFilter 46 | Which MIDI channel data should be sent to. */ 47 | 48 | int outputFilter; 49 | }; 50 | } // namespace giada::m 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/core/channels/midiLightning.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "core/channels/midiLightning.h" 28 | 29 | namespace giada::m 30 | { 31 | MidiLightning::MidiLightning() 32 | : enabled(false) 33 | { 34 | } 35 | 36 | /* -------------------------------------------------------------------------- */ 37 | 38 | MidiLightning::MidiLightning(const Patch::Channel& p) 39 | : enabled(p.midiOutL) 40 | , playing(p.midiOutLplaying) 41 | , mute(p.midiOutLmute) 42 | , solo(p.midiOutLsolo) 43 | { 44 | } 45 | }; // namespace giada::m 46 | -------------------------------------------------------------------------------- /src/core/channels/midiLightning.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_MIDI_LIGHTNING_H 28 | #define G_MIDI_LIGHTNING_H 29 | 30 | #include "core/midiLearnParam.h" 31 | #include "core/patch.h" 32 | 33 | namespace giada::m 34 | { 35 | class MidiLightning final 36 | { 37 | public: 38 | MidiLightning(); 39 | MidiLightning(const Patch::Channel&); 40 | 41 | /* enabled 42 | Tells whether MIDI lighting is enabled or not. */ 43 | 44 | bool enabled; 45 | 46 | /* MIDI learning fields for MIDI lighting. */ 47 | 48 | MidiLearnParam playing; 49 | MidiLearnParam mute; 50 | MidiLearnParam solo; 51 | }; 52 | } // namespace giada::m 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /src/core/confFactory.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_CONF_FACTORY_H 28 | #define G_CONF_FACTORY_H 29 | 30 | #include "core/conf.h" 31 | 32 | namespace giada::m::confFactory 33 | { 34 | /* serialize 35 | Writes Conf to disk. */ 36 | 37 | bool serialize(const Conf&); 38 | 39 | /* deserialize 40 | Reads data from disk into a new Conf object. */ 41 | 42 | Conf deserialize(); 43 | } // namespace giada::m::confFactory 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /src/core/init.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_INIT_H 28 | #define G_INIT_H 29 | 30 | namespace giada::m::init 31 | { 32 | /* tests 33 | Performs tests, if requested. Returns -1 if no tests are available or the 34 | `--run-tests` has not been passed in. */ 35 | 36 | int tests(int argc, char** argv); 37 | 38 | void startup(); 39 | void run(); 40 | void shutdown(); 41 | } // namespace giada::m::init 42 | 43 | #endif -------------------------------------------------------------------------------- /src/core/metronome.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "metronome.h" 28 | #include "deps/mcl-audio-buffer/src/audioBuffer.hpp" 29 | 30 | namespace giada::m 31 | { 32 | void Metronome::trigger(Click c, Frame o) const 33 | { 34 | m_rendering = true; 35 | m_click = c; 36 | m_offset = o; 37 | } 38 | 39 | /* -------------------------------------------------------------------------- */ 40 | 41 | void Metronome::render(mcl::AudioBuffer& outBuf) const 42 | { 43 | const float* data = m_click == Click::BEAT ? beat : bar; 44 | for (Frame f = m_offset; f < outBuf.countFrames() && m_rendering; f++) 45 | { 46 | for (int c = 0; c < outBuf.countChannels(); c++) 47 | outBuf[f][c] += data[m_tracker]; 48 | m_tracker = (m_tracker + 1) % CLICK_SIZE; 49 | if (m_tracker == 0) 50 | m_rendering = false; 51 | } 52 | m_offset = 0; 53 | } 54 | } // namespace giada::m -------------------------------------------------------------------------------- /src/core/midiLearnParam.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "midiLearnParam.h" 28 | #include 29 | 30 | namespace giada::m 31 | { 32 | MidiLearnParam::MidiLearnParam() 33 | : m_param(0) 34 | , m_index(0) 35 | { 36 | } 37 | 38 | MidiLearnParam::MidiLearnParam(uint32_t v, std::size_t index) 39 | : m_param(v) 40 | , m_index(index) 41 | { 42 | } 43 | 44 | /* -------------------------------------------------------------------------- */ 45 | 46 | uint32_t MidiLearnParam::getValue() const 47 | { 48 | return m_param.load(); 49 | } 50 | 51 | void MidiLearnParam::setValue(uint32_t v) 52 | { 53 | m_param.store(v); 54 | } 55 | 56 | std::size_t MidiLearnParam::getIndex() const 57 | { 58 | return m_index; 59 | } 60 | } // namespace giada::m 61 | -------------------------------------------------------------------------------- /src/core/midiLearnParam.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_MIDI_LEARN_PARAM_H 28 | #define G_MIDI_LEARN_PARAM_H 29 | 30 | #include "core/weakAtomic.h" 31 | #include 32 | #include 33 | 34 | namespace giada::m 35 | { 36 | class MidiLearnParam 37 | { 38 | public: 39 | MidiLearnParam(); 40 | MidiLearnParam(uint32_t v, std::size_t index = 0); 41 | 42 | uint32_t getValue() const; 43 | std::size_t getIndex() const; 44 | void setValue(uint32_t v); 45 | 46 | private: 47 | WeakAtomic m_param; 48 | std::size_t m_index; 49 | }; 50 | } // namespace giada::m 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/core/model/behaviors.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_MODEL_BEHAVIORS_H 28 | #define G_MODEL_BEHAVIORS_H 29 | 30 | namespace giada::m::model 31 | { 32 | struct Behaviors 33 | { 34 | bool chansStopOnSeqHalt = false; 35 | bool treatRecsAsLoops = false; 36 | bool inputMonitorDefaultOn = false; 37 | bool overdubProtectionDefaultOn = false; 38 | }; 39 | } // namespace giada::m::model 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/core/model/kernelMidi.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_MODEL_KERNEL_MIDI_H 28 | #define G_MODEL_KERNEL_MIDI_H 29 | 30 | #include "core/const.h" 31 | #include 32 | 33 | namespace giada::m::model 34 | { 35 | struct KernelMidi 36 | { 37 | RtMidi::Api api = G_DEFAULT_MIDI_API; 38 | std::set devicesOut; 39 | std::set devicesIn; 40 | std::string midiMapPath = ""; 41 | int sync = G_MIDI_SYNC_NONE; 42 | }; 43 | } // namespace giada::m::model 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /src/core/model/loadState.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "core/model/loadState.h" 28 | 29 | namespace giada::m::model 30 | { 31 | bool LoadState::isGood() const 32 | { 33 | return patch.status == G_FILE_OK && missingWaves.empty() && missingPlugins.empty(); 34 | } 35 | } // namespace giada::m::model 36 | -------------------------------------------------------------------------------- /src/core/model/loadState.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_MODEL_LOADSTATE_H 28 | #define G_MODEL_LOADSTATE_H 29 | 30 | #include "core/patch.h" 31 | 32 | namespace giada::m::model 33 | { 34 | /* LoadState 35 | Contains information about the model state after a patch has been loaded. */ 36 | 37 | struct LoadState 38 | { 39 | bool isGood() const; 40 | 41 | Patch patch; 42 | std::vector missingWaves = {}; 43 | std::vector missingPlugins = {}; 44 | }; 45 | } // namespace giada::m::model 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /src/core/model/midiIn.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_MODEL_MIDI_IN_H 28 | #define G_MODEL_MIDI_IN_H 29 | 30 | namespace giada::m::model 31 | { 32 | struct MidiIn 33 | { 34 | bool enabled = false; 35 | int filter = -1; 36 | uint32_t rewind = 0x0; 37 | uint32_t startStop = 0x0; 38 | uint32_t actionRec = 0x0; 39 | uint32_t inputRec = 0x0; 40 | uint32_t volumeIn = 0x0; 41 | uint32_t volumeOut = 0x0; 42 | uint32_t beatDouble = 0x0; 43 | uint32_t beatHalf = 0x0; 44 | uint32_t metronome = 0x0; 45 | }; 46 | } // namespace giada::m::model 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /src/core/model/sharedLock.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "core/model/sharedLock.h" 28 | #include "core/model/model.h" 29 | 30 | namespace giada::m::model 31 | { 32 | SharedLock::SharedLock(Model& m, SwapType t) 33 | : m_model(m) 34 | , m_swapType(t) 35 | { 36 | m_model.get().locked = true; 37 | m_model.swap(SwapType::NONE); 38 | } 39 | 40 | SharedLock::~SharedLock() 41 | { 42 | m_model.get().locked = false; 43 | m_model.swap(m_swapType); 44 | } 45 | } // namespace giada::m::model 46 | -------------------------------------------------------------------------------- /src/core/model/sharedLock.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_MODEL_SHAREDLOCK_H 28 | #define G_MODEL_SHAREDLOCK_H 29 | 30 | #include "core/model/types.h" 31 | 32 | namespace giada::m::model 33 | { 34 | class Model; 35 | class SharedLock 36 | { 37 | public: 38 | SharedLock(Model&, SwapType t); 39 | ~SharedLock(); 40 | 41 | private: 42 | Model& m_model; 43 | SwapType m_swapType; 44 | }; 45 | } // namespace giada::m::model 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /src/core/patch.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "core/patch.h" 28 | 29 | namespace giada::m 30 | { 31 | bool Patch::Version::operator==(const Version& o) const 32 | { 33 | return major == o.major && minor == o.minor && patch == o.patch; 34 | } 35 | 36 | bool Patch::Version::operator<(const Version& o) const 37 | { 38 | if (major < o.major) 39 | return true; 40 | else if (o.major < major) 41 | return false; 42 | if (minor < o.minor) 43 | return true; 44 | else if (o.minor < minor) 45 | return false; 46 | if (patch < o.patch) 47 | return true; 48 | else if (o.patch < patch) 49 | return false; 50 | return false; 51 | } 52 | } // namespace giada::m 53 | -------------------------------------------------------------------------------- /src/core/patchFactory.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_PATCH_FACTORY_H 28 | #define G_PATCH_FACTORY_H 29 | 30 | #include "core/patch.h" 31 | 32 | namespace giada::m::patchFactory 33 | { 34 | /* serialize 35 | Writes Patch to disk. The 'filePath' parameter refers to the .gptc file. */ 36 | 37 | bool serialize(const Patch&, const std::string& filePath); 38 | 39 | /* deserialize 40 | Reads data from disk into a new Patch object. The 'filePath' parameter refers to 41 | the .gptc file. */ 42 | 43 | Patch deserialize(const std::string& filePath); 44 | } // namespace giada::m::patchFactory 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /src/core/plugins/pluginState.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_PLUGIN_STATE_H 28 | #define G_PLUGIN_STATE_H 29 | 30 | #include 31 | #include 32 | #include 33 | 34 | namespace giada::m 35 | { 36 | class PluginState 37 | { 38 | public: 39 | PluginState() = default; // Invalid state 40 | PluginState(juce::MemoryBlock&& data); 41 | PluginState(const std::string& base64); 42 | 43 | std::string asBase64() const; 44 | const void* getData() const; 45 | size_t getSize() const; 46 | 47 | private: 48 | juce::MemoryBlock m_data; 49 | }; 50 | } // namespace giada::m 51 | 52 | #endif -------------------------------------------------------------------------------- /src/core/rendering/midiAdvance.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "core/rendering/midiAdvance.h" 28 | #include "core/channels/channel.h" 29 | #include "core/rendering/midiOutput.h" 30 | #include "core/rendering/midiReactions.h" 31 | 32 | namespace giada::m::rendering 33 | { 34 | void advanceMidiChannel(const Channel& ch, const Sequencer::Event& e, KernelMidi& kernelMidi) 35 | { 36 | if (e.type == Sequencer::EventType::FIRST_BEAT) 37 | rewindMidiChannel(ch.shared->playStatus); 38 | if (ch.isPlaying() && e.type == Sequencer::EventType::ACTIONS) 39 | sendMidiFromActions(ch, *e.actions, e.delta, kernelMidi); 40 | } 41 | } // namespace giada::m::rendering 42 | -------------------------------------------------------------------------------- /src/core/rendering/midiAdvance.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_RENDERING_MIDI_ADVANCE_H 28 | #define G_RENDERING_MIDI_ADVANCE_H 29 | 30 | #include "core/channels/channelShared.h" 31 | #include "core/sequencer.h" 32 | 33 | namespace giada::m 34 | { 35 | class Channel; 36 | class KernelMidi; 37 | } // namespace giada::m 38 | 39 | namespace giada::m::rendering 40 | { 41 | void advanceMidiChannel(const Channel&, const Sequencer::Event&, KernelMidi&); 42 | } // namespace giada::m::rendering 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /src/core/rendering/pluginRendering.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_RENDERING_PLUGIN_RENDERING_H 28 | #define G_RENDERING_PLUGIN_RENDERING_H 29 | 30 | #include "core/channels/channelShared.h" 31 | 32 | namespace giada::m 33 | { 34 | class PluginHost; 35 | } 36 | 37 | namespace giada::m::rendering 38 | { 39 | /* renderAudioAndMidiPlugins 40 | Renders plug-ins using the shared juce::MidiBuffer for MIDI event rendering. It 41 | renders normal audio plug-ins too. */ 42 | 43 | void renderAudioAndMidiPlugins(const Channel&, PluginHost&); 44 | 45 | /* renderAudioPlugins 46 | Renders audio-only plug-ins. */ 47 | 48 | void renderAudioPlugins(const Channel&, PluginHost&); 49 | } // namespace giada::m::rendering 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /src/core/rendering/sampleAdvance.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_RENDERING_SAMPLE_ADVANCE_H 28 | #define G_RENDERING_SAMPLE_ADVANCE_H 29 | 30 | #include "core/sequencer.h" 31 | #include "core/types.h" 32 | 33 | namespace giada::m 34 | { 35 | struct Action; 36 | struct ChannelShared; 37 | class Channel; 38 | } // namespace giada::m 39 | 40 | namespace giada::m::rendering 41 | { 42 | void advanceSampleChannel(const Channel&, const Sequencer::Event&); 43 | } // namespace giada::m::rendering 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /src/core/worker.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_WORKER_H 28 | #define G_WORKER_H 29 | 30 | #include 31 | #include 32 | #include 33 | 34 | namespace giada 35 | { 36 | class Worker 37 | { 38 | public: 39 | Worker(int sleep); 40 | ~Worker(); 41 | 42 | void start(std::function) const; 43 | void stop() const; 44 | void setSleep(int sleep); 45 | 46 | private: 47 | mutable std::thread m_thread; 48 | mutable std::atomic m_running; 49 | int m_sleep; 50 | }; 51 | } // namespace giada 52 | 53 | #endif -------------------------------------------------------------------------------- /src/ext/giada.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monocasual/giada/e495a0224a31b94da752d363f5e9207979bfdea5/src/ext/giada.ico -------------------------------------------------------------------------------- /src/ext/resource.h: -------------------------------------------------------------------------------- 1 | #define IDI_ICON1 101 2 | -------------------------------------------------------------------------------- /src/ext/resource.rc: -------------------------------------------------------------------------------- 1 | #include "resource.h" 2 | IDI_ICON1 ICON DISCARDABLE "giada.ico" -------------------------------------------------------------------------------- /src/glue/storage.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_GLUE_STORAGE_H 28 | #define G_GLUE_STORAGE_H 29 | 30 | /* giada::c::storage 31 | Persistence functions. Only the main thread can use these! */ 32 | 33 | namespace giada::c::storage 34 | { 35 | void loadProject(void* data); 36 | void saveProject(void* data); 37 | void saveSample(void* data); 38 | void loadSample(void* data); 39 | } // namespace giada::c::storage 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/gui/dialogs/about.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_ABOUT_H 28 | #define GD_ABOUT_H 29 | 30 | #include "gui/dialogs/window.h" 31 | 32 | namespace giada::v 33 | { 34 | class gdAbout : public gdWindow 35 | { 36 | public: 37 | gdAbout(); 38 | }; 39 | } // namespace giada::v 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/gui/dialogs/actionEditor/midiActionEditor.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_MIDI_ACTION_EDITOR_H 28 | #define GD_MIDI_ACTION_EDITOR_H 29 | 30 | #include "baseActionEditor.h" 31 | 32 | namespace giada::v 33 | { 34 | class gePianoRoll; 35 | class geVelocityEditor; 36 | class gdMidiActionEditor : public gdBaseActionEditor 37 | { 38 | public: 39 | gdMidiActionEditor(ID channelId, const Model&); 40 | ~gdMidiActionEditor(); 41 | 42 | void rebuild() override; 43 | 44 | private: 45 | gePianoRoll* m_pianoRoll; 46 | geVelocityEditor* m_velocityEditor; 47 | }; 48 | } // namespace giada::v 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /src/gui/dialogs/actionEditor/sampleActionEditor.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_SAMPLE_ACTION_EDITOR_H 28 | #define GD_SAMPLE_ACTION_EDITOR_H 29 | 30 | #include "baseActionEditor.h" 31 | 32 | namespace giada::v 33 | { 34 | class geSampleActionEditor; 35 | class geVelocityEditor; 36 | class geChoice; 37 | class gdSampleActionEditor : public gdBaseActionEditor 38 | { 39 | public: 40 | gdSampleActionEditor(ID channelId, const Model&); 41 | 42 | void rebuild() override; 43 | 44 | int getActionType() const; 45 | 46 | private: 47 | bool canChangeActionType(); 48 | 49 | geSampleActionEditor* m_sampleActionEditor; 50 | geVelocityEditor* m_velocityEditor; 51 | geChoice* m_actionType; 52 | }; 53 | } // namespace giada::v 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /src/gui/dialogs/beatsInput.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_BEATSINPUT_H 28 | #define GD_BEATSINPUT_H 29 | 30 | #include "window.h" 31 | 32 | namespace giada::v 33 | { 34 | class geTextButton; 35 | class geInput; 36 | class gdBeatsInput : public gdWindow 37 | { 38 | public: 39 | gdBeatsInput(int beats, int bars); 40 | 41 | private: 42 | geInput* m_beats; 43 | geInput* m_bars; 44 | geTextButton* m_ok; 45 | }; 46 | } // namespace giada::v 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /src/gui/dialogs/bpmInput.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_BPMINPUT_H 28 | #define GD_BPMINPUT_H 29 | 30 | #include "window.h" 31 | 32 | namespace giada::v 33 | { 34 | class geTextButton; 35 | class geInput; 36 | class gdBpmInput : public gdWindow 37 | { 38 | public: 39 | gdBpmInput(float value); 40 | 41 | private: 42 | geInput* m_value; 43 | geTextButton* m_ok; 44 | }; 45 | } // namespace giada::v 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /src/gui/dialogs/browser/browserDir.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_BROWSER_DIR_H 28 | #define GD_BROWSER_DIR_H 29 | 30 | #include "browserBase.h" 31 | #include "core/conf.h" 32 | 33 | namespace giada::v 34 | { 35 | class gdBrowserDir : public gdBrowserBase 36 | { 37 | public: 38 | gdBrowserDir(const std::string& title, const std::string& path, 39 | std::function cb, const Model&); 40 | 41 | private: 42 | static void cb_load(Fl_Widget* /*w*/, void* p); 43 | static void cb_down(Fl_Widget* /*w*/, void* p); 44 | void cb_load(); 45 | void cb_down(); 46 | }; 47 | } // namespace giada::v 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /src/gui/dialogs/browser/browserLoad.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_BROWSER_LOAD_H 28 | #define GD_BROWSER_LOAD_H 29 | 30 | #include "gui/dialogs/browser/browserBase.h" 31 | 32 | namespace giada::v 33 | { 34 | class gdBrowserLoad : public gdBrowserBase 35 | { 36 | public: 37 | gdBrowserLoad(const std::string& title, const std::string& path, 38 | std::function cb, ID channelId, const Model&); 39 | 40 | private: 41 | static void cb_down(Fl_Widget* /*w*/, void* p); 42 | void cb_down(); 43 | }; 44 | } // namespace giada::v 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /src/gui/dialogs/browser/browserSave.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_BROWSER_SAVE_H 28 | #define GD_BROWSER_SAVE_H 29 | 30 | #include "browserBase.h" 31 | #include "core/conf.h" 32 | 33 | namespace giada::v 34 | { 35 | class geInput; 36 | class gdBrowserSave : public gdBrowserBase 37 | { 38 | public: 39 | gdBrowserSave(const std::string& title, const std::string& path, 40 | const std::string& name, std::function cb, 41 | ID channelId, const Model&); 42 | 43 | std::string getName() const; 44 | 45 | private: 46 | static void cb_down(Fl_Widget* /*w*/, void* p); 47 | void cb_down(); 48 | }; 49 | } // namespace giada::v 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /src/gui/dialogs/channelNameInput.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_CHANNEL_NAME_INPUT_H 28 | #define GD_CHANNEL_NAME_INPUT_H 29 | 30 | #include "window.h" 31 | 32 | namespace giada::c::channel 33 | { 34 | struct Data; 35 | } 36 | 37 | namespace giada::v 38 | { 39 | class geTextButton; 40 | class geInput; 41 | class gdChannelNameInput : public gdWindow 42 | { 43 | public: 44 | gdChannelNameInput(const c::channel::Data& d); 45 | 46 | private: 47 | const c::channel::Data& m_data; 48 | 49 | geInput* m_name; 50 | geTextButton* m_ok; 51 | geTextButton* m_cancel; 52 | }; 53 | } // namespace giada::v 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /src/gui/dialogs/channelRouting.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_CHANNEL_ROUTING_H 28 | #define GD_CHANNEL_ROUTING_H 29 | 30 | #include "gui/dialogs/window.h" 31 | 32 | namespace giada::c::channel 33 | { 34 | struct Data; 35 | } 36 | 37 | namespace giada::v 38 | { 39 | class geVolumeTool; 40 | class gePanTool; 41 | class geTextButton; 42 | class gdChannelRouting : public gdWindow 43 | { 44 | public: 45 | gdChannelRouting(const c::channel::Data& d); 46 | 47 | private: 48 | geVolumeTool* m_volume; 49 | gePanTool* m_pan; 50 | geTextButton* m_close; 51 | }; 52 | } // namespace giada::v 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /src/gui/dialogs/config.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_CONFIG_H 28 | #define GD_CONFIG_H 29 | 30 | #include "gui/model.h" 31 | #include "window.h" 32 | 33 | namespace giada::v 34 | { 35 | class geTabAudio; 36 | class geTabBehaviors; 37 | class geTabMidi; 38 | class geTabMisc; 39 | class geTabBindings; 40 | class geTabPlugins; 41 | class gdConfig : public gdWindow 42 | { 43 | public: 44 | gdConfig(const Model&); 45 | ~gdConfig(); 46 | 47 | geTabAudio* tabAudio; 48 | geTabBehaviors* tabBehaviors; 49 | geTabMidi* tabMidi; 50 | geTabMisc* tabMisc; 51 | geTabBindings* tabBindings; 52 | geTabPlugins* tabPlugins; 53 | }; 54 | } // namespace giada::v 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /src/gui/dialogs/midiIO/midiInputBase.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "gui/dialogs/midiIO/midiInputBase.h" 28 | #include "glue/io.h" 29 | #include "gui/ui.h" 30 | #include "utils/gui.h" 31 | 32 | extern giada::v::Ui* g_ui; 33 | 34 | namespace giada::v 35 | { 36 | gdMidiInputBase::gdMidiInputBase(const char* title, const Model& model) 37 | : gdWindow(u::gui::getCenterWinBounds(model.midiInputBounds), title, WID_MIDI_INPUT) 38 | { 39 | } 40 | 41 | /* -------------------------------------------------------------------------- */ 42 | 43 | gdMidiInputBase::~gdMidiInputBase() 44 | { 45 | c::io::stopMidiLearn(); 46 | 47 | g_ui->model.midiInputBounds = getBounds(); 48 | } 49 | } // namespace giada::v -------------------------------------------------------------------------------- /src/gui/dialogs/midiIO/midiInputBase.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_MIDI_INPUT_BASE_H 28 | #define GD_MIDI_INPUT_BASE_H 29 | 30 | #include "gui/dialogs/window.h" 31 | #include "gui/elems/midiIO/midiLearner.h" 32 | #include "gui/model.h" 33 | 34 | namespace giada::v 35 | { 36 | class geCheck; 37 | class geTextButton; 38 | class geChoice; 39 | class gdMidiInputBase : public gdWindow 40 | { 41 | public: 42 | virtual ~gdMidiInputBase(); 43 | 44 | protected: 45 | gdMidiInputBase(const char* title, const Model&); 46 | 47 | geTextButton* m_ok; 48 | geCheck* m_enable; 49 | geChoice* m_channel; 50 | }; 51 | } // namespace giada::v 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /src/gui/dialogs/midiIO/midiOutputMidiCh.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * midiOutputMidiCh 6 | * 7 | * ----------------------------------------------------------------------------- 8 | * 9 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 10 | * 11 | * This file is part of Giada - Your Hardcore Loopmachine. 12 | * 13 | * Giada - Your Hardcore Loopmachine is free software: you can 14 | * redistribute it and/or modify it under the terms of the GNU General 15 | * Public License as published by the Free Software Foundation, either 16 | * version 3 of the License, or (at your option) any later version. 17 | * 18 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 19 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with Giada - Your Hardcore Loopmachine. If not, see 25 | * . 26 | * 27 | * -------------------------------------------------------------------------- */ 28 | 29 | #ifndef GD_MIDI_OUTPUT_MIDI_CH_H 30 | #define GD_MIDI_OUTPUT_MIDI_CH_H 31 | 32 | #include "midiOutputBase.h" 33 | 34 | namespace giada::v 35 | { 36 | class geChoice; 37 | class gdMidiOutputMidiCh : public gdMidiOutputBase 38 | { 39 | public: 40 | gdMidiOutputMidiCh(ID channelId); 41 | 42 | void rebuild() override; 43 | 44 | private: 45 | geCheck* m_enableOut; 46 | geChoice* m_chanListOut; 47 | }; 48 | } // namespace giada::v 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /src/gui/dialogs/midiIO/midiOutputSampleCh.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_MIDI_OUTPUT_SAMPLE_CH_H 28 | #define GD_MIDI_OUTPUT_SAMPLE_CH_H 29 | 30 | #include "midiOutputBase.h" 31 | 32 | namespace giada::v 33 | { 34 | class gdMidiOutputSampleCh : public gdMidiOutputBase 35 | { 36 | public: 37 | gdMidiOutputSampleCh(ID channelId); 38 | 39 | void rebuild() override; 40 | }; 41 | } // namespace giada::v 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/gui/dialogs/missingAssets.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_MISSING_ASSETS_H 28 | #define GD_MISSING_ASSETS_H 29 | 30 | #include "core/api/storageApi.h" 31 | #include "gui/dialogs/window.h" 32 | 33 | namespace giada::v 34 | { 35 | class gdMissingAssets : public gdWindow 36 | { 37 | public: 38 | gdMissingAssets(const m::model::LoadState&); 39 | }; 40 | } // namespace giada::v 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/gui/dialogs/pluginChooser.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_PLUGIN_CHOOSER_H 28 | #define GD_PLUGIN_CHOOSER_H 29 | 30 | #include "core/types.h" 31 | #include "gui/model.h" 32 | #include "window.h" 33 | 34 | namespace giada::v 35 | { 36 | class geTextButton; 37 | class geChoice; 38 | class gePluginBrowser; 39 | class gdPluginChooser : public gdWindow 40 | { 41 | public: 42 | gdPluginChooser(ID channelId, const Model&); 43 | ~gdPluginChooser(); 44 | 45 | private: 46 | m::PluginManager::SortMode getSortMode() const; 47 | 48 | geChoice* sortMethod; 49 | geChoice* sortDir; 50 | geTextButton* addBtn; 51 | geTextButton* cancelBtn; 52 | gePluginBrowser* browser; 53 | 54 | ID m_channelId; 55 | }; 56 | } // namespace giada::v 57 | 58 | #endif -------------------------------------------------------------------------------- /src/gui/dialogs/pluginList.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_PLUGINLIST_H 28 | #define GD_PLUGINLIST_H 29 | 30 | #include "core/conf.h" 31 | #include "glue/plugin.h" 32 | #include "window.h" 33 | 34 | namespace giada::v 35 | { 36 | class geTextButton; 37 | class geLiquidScroll; 38 | class gePluginElement; 39 | class gdPluginList : public gdWindow 40 | { 41 | public: 42 | gdPluginList(ID channelId, geompp::Rect bounds); 43 | ~gdPluginList(); 44 | 45 | void rebuild() override; 46 | 47 | const gePluginElement& getNextElement(const gePluginElement& curr) const; 48 | const gePluginElement& getPrevElement(const gePluginElement& curr) const; 49 | 50 | private: 51 | geTextButton* addPlugin; 52 | geLiquidScroll* list; 53 | 54 | ID m_channelId; 55 | c::plugin::Plugins m_plugins; 56 | }; 57 | } // namespace giada::v 58 | 59 | #endif -------------------------------------------------------------------------------- /src/gui/dialogs/pluginWindow.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_PLUGIN_WINDOW_H 28 | #define GD_PLUGIN_WINDOW_H 29 | 30 | #include "glue/plugin.h" 31 | #include "window.h" 32 | 33 | class geSlider; 34 | 35 | namespace giada::m 36 | { 37 | class Plugin; 38 | } 39 | 40 | namespace giada::v 41 | { 42 | class geBox; 43 | class geLiquidScroll; 44 | class gdPluginWindow : public gdWindow 45 | { 46 | public: 47 | gdPluginWindow(const c::plugin::Plugin&, ID wid); 48 | 49 | void updateParameters(bool changeSlider = false); 50 | 51 | private: 52 | c::plugin::Plugin m_plugin; 53 | 54 | geLiquidScroll* m_list; 55 | }; 56 | } // namespace giada::v 57 | 58 | #endif -------------------------------------------------------------------------------- /src/gui/dialogs/pluginWindowGUI.h: -------------------------------------------------------------------------------- 1 | 2 | /* ----------------------------------------------------------------------------- 3 | * 4 | * Giada - Your Hardcore Loopmachine 5 | * 6 | * gd_pluginWindowGUI 7 | * 8 | * ----------------------------------------------------------------------------- 9 | * 10 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 11 | * 12 | * This file is part of Giada - Your Hardcore Loopmachine. 13 | * 14 | * Giada - Your Hardcore Loopmachine is free software: you can 15 | * redistribute it and/or modify it under the terms of the GNU General 16 | * Public License as published by the Free Software Foundation, either 17 | * version 3 of the License, or (at your option) any later version. 18 | * 19 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 20 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 21 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 22 | * See the GNU General Public License for more details. 23 | * 24 | * You should have received a copy of the GNU General Public License 25 | * along with Giada - Your Hardcore Loopmachine. If not, see 26 | * . 27 | * 28 | * -------------------------------------------------------------------------- */ 29 | 30 | #ifndef GD_PLUGIN_WINDOW_GUI_H 31 | #define GD_PLUGIN_WINDOW_GUI_H 32 | 33 | #include "glue/plugin.h" 34 | #include "window.h" 35 | #include 36 | #include 37 | #include 38 | #include 39 | 40 | namespace giada::v 41 | { 42 | class gdPluginWindowGUI : public gdWindow 43 | { 44 | public: 45 | gdPluginWindowGUI(const c::plugin::Plugin&, ID wid); 46 | ~gdPluginWindowGUI(); 47 | 48 | private: 49 | void createEditor(); 50 | void showEditor(); 51 | void closeEditor(); 52 | void adjustSize(); 53 | 54 | c::plugin::Plugin m_plugin; 55 | std::unique_ptr m_editor; 56 | }; 57 | } // namespace giada::v 58 | 59 | #endif -------------------------------------------------------------------------------- /src/gui/dialogs/progress.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_PROGRESS_H 28 | #define GD_PROGRESS_H 29 | 30 | #include "gui/dialogs/window.h" 31 | #include 32 | 33 | namespace giada::v 34 | { 35 | class geBox; 36 | class geProgress; 37 | class geTextButton; 38 | class gdProgress : public gdWindow 39 | { 40 | public: 41 | gdProgress(); 42 | 43 | void setProgress(float p); 44 | void popup(const char* s, bool cancellable = false); 45 | 46 | std::function onCancel; 47 | 48 | private: 49 | geBox* m_text; 50 | geProgress* m_progress; 51 | geTextButton* m_cancelBtn; 52 | }; 53 | } // namespace giada::v 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /src/gui/dialogs/warnings.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GD_WARNINGS_H 28 | #define GD_WARNINGS_H 29 | 30 | namespace giada::v 31 | { 32 | void gdAlert(const char* c, bool resizable = false); 33 | int gdConfirmWin(const char* title, const char* msg); 34 | } // namespace giada::v 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /src/gui/elems/actionEditor/envelopePoint.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "envelopePoint.h" 28 | #include "core/const.h" 29 | #include 30 | 31 | namespace giada::v 32 | { 33 | geEnvelopePoint::geEnvelopePoint(Pixel X, Pixel Y, m::Action a) 34 | : geBaseAction(X, Y, SIDE, SIDE, /*resizable=*/false, a, {}) 35 | { 36 | } 37 | 38 | /* -------------------------------------------------------------------------- */ 39 | 40 | void geEnvelopePoint::draw() 41 | { 42 | fl_color(hovered ? G_COLOR_LIGHT_2 : G_COLOR_LIGHT_1); 43 | fl_pie(x(), y(), w(), h(), 0, 360); 44 | } 45 | } // namespace giada::v -------------------------------------------------------------------------------- /src/gui/elems/actionEditor/envelopePoint.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_ENVELOPE_POINT_H 28 | #define GE_ENVELOPE_POINT_H 29 | 30 | #include "baseAction.h" 31 | #include "src/core/actions/action.h" 32 | 33 | namespace giada::v 34 | { 35 | class geEnvelopePoint : public geBaseAction 36 | { 37 | public: 38 | static const Pixel SIDE = 12; 39 | 40 | geEnvelopePoint(Pixel x, Pixel y, m::Action a); 41 | 42 | void draw() override; 43 | }; 44 | } // namespace giada::v 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /src/gui/elems/actionEditor/gridTool.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_GRID_TOOL_H 28 | #define GE_GRID_TOOL_H 29 | 30 | #include "core/types.h" 31 | #include "gui/model.h" 32 | #include 33 | 34 | namespace giada::v 35 | { 36 | class geCheck; 37 | class geChoice; 38 | class geGridTool : public Fl_Group 39 | { 40 | public: 41 | geGridTool(Pixel x, Pixel y, const Model&); 42 | ~geGridTool(); 43 | 44 | int getValue() const; 45 | bool isOn() const; 46 | 47 | Frame getSnapFrame(Frame f, Frame framesInBeat) const; 48 | 49 | /* getCellSize 50 | Returns the size in frames of a single cell of the grid. */ 51 | 52 | Frame getCellSize(Frame framesInBeat) const; 53 | 54 | private: 55 | geChoice* gridType; 56 | geCheck* active; 57 | }; 58 | } // namespace giada::v 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /src/gui/elems/actionEditor/legend.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "gui/elems/actionEditor/legend.h" 28 | #include "core/const.h" 29 | #include "gui/drawing.h" 30 | #include 31 | 32 | namespace giada::v 33 | { 34 | geLegend::geLegend(const char* label) 35 | : geBox(label) 36 | { 37 | } 38 | 39 | /* -------------------------------------------------------------------------- */ 40 | 41 | void geLegend::draw() 42 | { 43 | const geompp::Rect bounds = {x(), y(), w(), h()}; 44 | 45 | drawRectf(bounds, G_COLOR_GREY_2); // Clear background 46 | 47 | drawLine(bounds.getTopLine(), G_COLOR_GREY_4); 48 | drawLine(bounds.getLeftLine(), G_COLOR_GREY_4); 49 | drawLine(bounds.getBottomLine().withShiftedY(-1), G_COLOR_GREY_4); 50 | 51 | drawTextVertical(label(), bounds, FL_HELVETICA, G_GUI_FONT_SIZE_BASE, G_COLOR_GREY_5); 52 | } 53 | } // namespace giada::v 54 | -------------------------------------------------------------------------------- /src/gui/elems/actionEditor/legend.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_LEGEND_H 28 | #define GE_LEGEND_H 29 | 30 | #include "core/types.h" 31 | #include "gui/elems/basics/box.h" 32 | 33 | namespace giada::v 34 | { 35 | class geLegend : public geBox 36 | { 37 | public: 38 | geLegend(const char* label); 39 | 40 | void draw() override; 41 | }; 42 | } // namespace giada::v 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /src/gui/elems/actionEditor/pianoItem.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_PIANO_ITEM_H 28 | #define GE_PIANO_ITEM_H 29 | 30 | #include "baseAction.h" 31 | 32 | namespace giada::m 33 | { 34 | struct Action; 35 | } 36 | 37 | namespace giada::v 38 | { 39 | class gePianoItem : public geBaseAction 40 | { 41 | public: 42 | gePianoItem(int x, int y, int w, int h, m::Action a1, m::Action a2); 43 | 44 | void draw() override; 45 | 46 | bool isResizable() const; 47 | 48 | private: 49 | bool m_ringLoop; 50 | bool m_orphaned; 51 | 52 | Pixel calcVelocityH() const; 53 | }; 54 | } // namespace giada::v 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /src/gui/elems/actionEditor/sampleAction.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_SAMPLE_ACTION_H 28 | #define GE_SAMPLE_ACTION_H 29 | 30 | #include "baseAction.h" 31 | #include "src/core/actions/action.h" 32 | 33 | namespace giada::v 34 | { 35 | class geSampleAction : public geBaseAction 36 | { 37 | public: 38 | geSampleAction(Pixel x, Pixel y, Pixel w, Pixel h, bool singlePress, 39 | m::Action a1, m::Action a2); 40 | 41 | void draw() override; 42 | 43 | private: 44 | bool m_singlePress; 45 | }; 46 | } // namespace giada::v 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /src/gui/elems/actionEditor/sampleActionEditor.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_SAMPLE_ACTION_EDITOR_H 28 | #define GE_SAMPLE_ACTION_EDITOR_H 29 | 30 | #include "baseActionEditor.h" 31 | 32 | namespace giada::m 33 | { 34 | struct Action; 35 | } 36 | 37 | namespace giada::v 38 | { 39 | class geSampleAction; 40 | class geSampleActionEditor : public geBaseActionEditor 41 | { 42 | public: 43 | geSampleActionEditor(Pixel x, Pixel y, gdBaseActionEditor*); 44 | 45 | void draw() override; 46 | 47 | void rebuild(c::actionEditor::Data& d) override; 48 | 49 | private: 50 | void onAddAction() override; 51 | void onDeleteAction() override; 52 | void onMoveAction() override; 53 | void onResizeAction() override; 54 | void onRefreshAction() override; 55 | 56 | bool isNoteOffSinglePress(const m::Action& a); 57 | }; 58 | } // namespace giada::v 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /src/gui/elems/actionEditor/velocityEditor.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_VELOCITY_EDITOR_H 28 | #define GE_VELOCITY_EDITOR_H 29 | 30 | #include "baseActionEditor.h" 31 | 32 | namespace giada::v 33 | { 34 | class geVelocityEditor : public geBaseActionEditor 35 | { 36 | public: 37 | geVelocityEditor(Pixel x, Pixel y, gdBaseActionEditor*); 38 | 39 | void draw() override; 40 | 41 | void rebuild(c::actionEditor::Data& d) override; 42 | 43 | private: 44 | void onMoveAction() override; 45 | void onRefreshAction() override; 46 | void onAddAction() override {}; 47 | void onDeleteAction() override {}; 48 | void onResizeAction() override {}; 49 | 50 | Pixel valueToY(float v) const; 51 | float yToValue(Pixel y) const; 52 | }; 53 | } // namespace giada::v 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /src/gui/elems/basics/box.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_BOX_H 28 | #define GE_BOX_H 29 | 30 | #include 31 | #include 32 | #include 33 | 34 | namespace giada::v 35 | { 36 | class geBox : public Fl_Box 37 | { 38 | public: 39 | geBox(int x, int y, int w, int h, const char* l = nullptr, Fl_Align al = FL_ALIGN_CENTER); 40 | geBox(const char* l = nullptr, Fl_Align al = FL_ALIGN_CENTER); 41 | 42 | void draw() override; 43 | 44 | void setSvgImage(const char*); 45 | 46 | private: 47 | std::unique_ptr m_image; 48 | }; 49 | } // namespace giada::v 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /src/gui/elems/basics/boxtypes.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * boxtypes 6 | * 7 | * ----------------------------------------------------------------------------- 8 | * 9 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 10 | * 11 | * This file is part of Giada - Your Hardcore Loopmachine. 12 | * 13 | * Giada - Your Hardcore Loopmachine is free software: you can 14 | * redistribute it and/or modify it under the terms of the GNU General 15 | * Public License as published by the Free Software Foundation, either 16 | * version 3 of the License, or (at your option) any later version. 17 | * 18 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 19 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with Giada - Your Hardcore Loopmachine. If not, see 25 | * . 26 | * 27 | * -------------------------------------------------------------------------- */ 28 | 29 | #include "boxtypes.h" 30 | #include "../../../core/const.h" 31 | #include 32 | 33 | void g_customBorderBox(int x, int y, int w, int h, Fl_Color c) 34 | { 35 | fl_color(c); 36 | fl_rectf(x, y, w, h); 37 | fl_color(G_COLOR_GREY_4); 38 | fl_rect(x, y, w, h); 39 | } 40 | 41 | void g_customUpBox(int x, int y, int w, int h, Fl_Color /*c*/) 42 | { 43 | fl_color(G_COLOR_GREY_2); 44 | fl_rectf(x, y, w, h); 45 | fl_color(G_COLOR_GREY_2); 46 | fl_rect(x, y, w, h); 47 | } 48 | 49 | void g_customDownBox(int x, int y, int w, int h, Fl_Color c) 50 | { 51 | fl_color(c); 52 | fl_rectf(x, y, w, h); 53 | fl_color(G_COLOR_GREY_2); 54 | fl_rect(x, y, w, h); 55 | } 56 | -------------------------------------------------------------------------------- /src/gui/elems/basics/boxtypes.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * boxtypes 6 | * 7 | * ----------------------------------------------------------------------------- 8 | * 9 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 10 | * 11 | * This file is part of Giada - Your Hardcore Loopmachine. 12 | * 13 | * Giada - Your Hardcore Loopmachine is free software: you can 14 | * redistribute it and/or modify it under the terms of the GNU General 15 | * Public License as published by the Free Software Foundation, either 16 | * version 3 of the License, or (at your option) any later version. 17 | * 18 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 19 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with Giada - Your Hardcore Loopmachine. If not, see 25 | * . 26 | * 27 | * -------------------------------------------------------------------------- */ 28 | 29 | #ifndef GE_BOXTYPES_H 30 | #define GE_BOXTYPES_H 31 | 32 | #include 33 | 34 | constexpr Fl_Boxtype G_CUSTOM_BORDER_BOX = FL_FREE_BOXTYPE; 35 | constexpr Fl_Boxtype G_CUSTOM_UP_BOX = static_cast(FL_FREE_BOXTYPE + 1); 36 | constexpr Fl_Boxtype G_CUSTOM_DOWN_BOX = static_cast(FL_FREE_BOXTYPE + 3); 37 | 38 | void g_customBorderBox(int x, int y, int w, int h, Fl_Color c); 39 | void g_customUpBox(int x, int y, int w, int h, Fl_Color c); 40 | void g_customDownBox(int x, int y, int w, int h, Fl_Color c); 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/gui/elems/basics/browser.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_BROWSER_H 28 | #define GE_BROWSER_H 29 | 30 | #include 31 | 32 | namespace giada::v 33 | { 34 | class geBrowser : public Fl_Browser 35 | { 36 | public: 37 | geBrowser(int x, int y, int w, int h); 38 | geBrowser(); 39 | }; 40 | } // namespace giada::v 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/gui/elems/basics/check.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_CHECK_H 28 | #define GE_CHECK_H 29 | 30 | #include 31 | #include 32 | 33 | namespace giada::v 34 | { 35 | class geCheck : public Fl_Check_Button 36 | { 37 | public: 38 | static constexpr int CHECKBOX_WIDTH = 12; 39 | 40 | geCheck(); 41 | geCheck(int x, int y, int w, int h, const char* l = nullptr); 42 | 43 | void draw() override; 44 | 45 | std::function onChange = nullptr; 46 | 47 | private: 48 | static void cb_onChange(Fl_Widget* w, void* p); 49 | void cb_onChange(); 50 | }; 51 | } // namespace giada::v 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /src/gui/elems/basics/dial.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_DIAL_H 28 | #define GE_DIAL_H 29 | 30 | #include 31 | #include 32 | 33 | namespace giada::v 34 | { 35 | class geDial : public Fl_Dial 36 | { 37 | public: 38 | geDial(int x, int y, int w, int h, const char* l = nullptr); 39 | geDial(const char* l = nullptr); 40 | 41 | void draw() override; 42 | 43 | std::function onChange; 44 | 45 | private: 46 | static void cb_change(Fl_Widget*, void*); 47 | }; 48 | } // namespace giada::v 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /src/gui/elems/basics/imageButton.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_IMAGE_BUTTON_H 28 | #define GE_IMAGE_BUTTON_H 29 | 30 | #include "gui/elems/basics/button.h" 31 | #include 32 | #include 33 | 34 | namespace giada::v 35 | { 36 | class geImageButton : public geButton 37 | { 38 | public: 39 | geImageButton(int x, int y, int w, int h, const char* imgOff, const char* imgOn, const char* imgDisabled = nullptr); 40 | geImageButton(const char* imgOff, const char* imgOn, const char* imgDisabled = nullptr); 41 | 42 | void draw() override; 43 | 44 | protected: 45 | void draw(Fl_SVG_Image*); 46 | 47 | std::unique_ptr m_imgOff; 48 | std::unique_ptr m_imgOn; 49 | std::unique_ptr m_imgDisabled; 50 | }; 51 | } // namespace giada::v 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /src/gui/elems/basics/menu.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_MENU_H 28 | #define GE_MENU_H 29 | 30 | #include "core/types.h" 31 | #include 32 | #include 33 | #include 34 | #include 35 | 36 | namespace giada::v 37 | { 38 | class geMenu : public Fl_Menu_Button 39 | { 40 | public: 41 | geMenu(); 42 | 43 | void addItem(ID, const char* text, int flags = 0); 44 | void setEnabled(ID, bool); 45 | 46 | std::function onSelect; 47 | 48 | private: 49 | static void callback(Fl_Widget*, void*); 50 | void callback(ID); 51 | }; 52 | } // namespace giada::v 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /src/gui/elems/basics/pack.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * geScroll 6 | * Custom scroll with nice scrollbars and something else. 7 | * 8 | * ----------------------------------------------------------------------------- 9 | * 10 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 11 | * 12 | * This file is part of Giada - Your Hardcore Loopmachine. 13 | * 14 | * Giada - Your Hardcore Loopmachine is free software: you can 15 | * redistribute it and/or modify it under the terms of the GNU General 16 | * Public License as published by the Free Software Foundation, either 17 | * version 3 of the License, or (at your option) any later version. 18 | * 19 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 20 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 21 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 22 | * See the GNU General Public License for more details. 23 | * 24 | * You should have received a copy of the GNU General Public License 25 | * along with Giada - Your Hardcore Loopmachine. If not, see 26 | * . 27 | * 28 | * -------------------------------------------------------------------------- */ 29 | 30 | #include "pack.h" 31 | #include "core/const.h" 32 | 33 | namespace giada::v 34 | { 35 | gePack::gePack(int x, int y, Direction d, int gutter) 36 | : geGroup(x, y) 37 | , m_direction(d) 38 | , m_gutter(gutter) 39 | { 40 | end(); 41 | } 42 | 43 | /* -------------------------------------------------------------------------- */ 44 | 45 | void gePack::add(Fl_Widget* widget) 46 | { 47 | if (countChildren() == 0) 48 | widget->position(0, 0); 49 | else if (m_direction == Direction::HORIZONTAL) 50 | widget->position((getLastChild()->x() + getLastChild()->w() + m_gutter) - x(), 0); 51 | else 52 | widget->position(0, (getLastChild()->y() + getLastChild()->h() + m_gutter) - y()); 53 | 54 | geGroup::add(widget); 55 | } 56 | } // namespace giada::v -------------------------------------------------------------------------------- /src/gui/elems/basics/progress.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "gui/elems/basics/progress.h" 28 | #include "core/const.h" 29 | #include "gui/elems/basics/boxtypes.h" 30 | 31 | namespace giada::v 32 | { 33 | geProgress::geProgress(int x, int y, int w, int h, const char* l) 34 | : Fl_Progress(x, y, w, h, l) 35 | { 36 | color(G_COLOR_GREY_2, G_COLOR_GREY_4); 37 | box(G_CUSTOM_BORDER_BOX); 38 | } 39 | 40 | /* -------------------------------------------------------------------------- */ 41 | 42 | geProgress::geProgress() 43 | : geProgress(0, 0, 0, 0) 44 | { 45 | } 46 | } // namespace giada::v -------------------------------------------------------------------------------- /src/gui/elems/basics/progress.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_PROGRESS_H 28 | #define GE_PROGRESS_H 29 | 30 | #include 31 | 32 | namespace giada::v 33 | { 34 | class geProgress : public Fl_Progress 35 | { 36 | public: 37 | geProgress(int x, int y, int w, int h, const char* l = nullptr); 38 | geProgress(); 39 | }; 40 | } // namespace giada::v 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/gui/elems/basics/scrollbar.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * geScroll 6 | * Custom scroll with nice scrollbars and something else. 7 | * 8 | * ----------------------------------------------------------------------------- 9 | * 10 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 11 | * 12 | * This file is part of Giada - Your Hardcore Loopmachine. 13 | * 14 | * Giada - Your Hardcore Loopmachine is free software: you can 15 | * redistribute it and/or modify it under the terms of the GNU General 16 | * Public License as published by the Free Software Foundation, either 17 | * version 3 of the License, or (at your option) any later version. 18 | * 19 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 20 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 21 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 22 | * See the GNU General Public License for more details. 23 | * 24 | * You should have received a copy of the GNU General Public License 25 | * along with Giada - Your Hardcore Loopmachine. If not, see 26 | * . 27 | * 28 | * -------------------------------------------------------------------------- */ 29 | 30 | #include "gui/elems/basics/scrollbar.h" 31 | #include "core/const.h" 32 | #include "gui/elems/basics/boxtypes.h" 33 | 34 | namespace giada::v 35 | { 36 | geScrollbar::geScrollbar() 37 | : Fl_Scrollbar(0, 0, 0, 0) 38 | , onScroll(nullptr) 39 | { 40 | color(G_COLOR_GREY_2); 41 | selection_color(G_COLOR_GREY_4); 42 | labelcolor(G_COLOR_LIGHT_1); 43 | slider(G_CUSTOM_BORDER_BOX); 44 | 45 | callback([](Fl_Widget* w) 46 | { 47 | const geScrollbar* self = static_cast(w); 48 | if (self->onScroll) 49 | self->onScroll(self->value()); 50 | }); 51 | } 52 | } // namespace giada::v 53 | -------------------------------------------------------------------------------- /src/gui/elems/basics/scrollbar.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * geScroll 6 | * Custom scroll with nice scrollbars and something else. 7 | * 8 | * ----------------------------------------------------------------------------- 9 | * 10 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 11 | * 12 | * This file is part of Giada - Your Hardcore Loopmachine. 13 | * 14 | * Giada - Your Hardcore Loopmachine is free software: you can 15 | * redistribute it and/or modify it under the terms of the GNU General 16 | * Public License as published by the Free Software Foundation, either 17 | * version 3 of the License, or (at your option) any later version. 18 | * 19 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 20 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 21 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 22 | * See the GNU General Public License for more details. 23 | * 24 | * You should have received a copy of the GNU General Public License 25 | * along with Giada - Your Hardcore Loopmachine. If not, see 26 | * . 27 | * 28 | * -------------------------------------------------------------------------- */ 29 | 30 | #ifndef GE_SCROLLBAR_H 31 | #define GE_SCROLLBAR_H 32 | 33 | #include 34 | #include 35 | 36 | namespace giada::v 37 | { 38 | class geScrollbar : public Fl_Scrollbar 39 | { 40 | public: 41 | geScrollbar(); 42 | 43 | std::function onScroll; 44 | }; 45 | } // namespace giada::v 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /src/gui/elems/basics/slider.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "slider.h" 28 | #include "../../../core/const.h" 29 | #include "boxtypes.h" 30 | 31 | namespace giada::v 32 | { 33 | geSlider::geSlider(int x, int y, int w, int h, const char* l) 34 | : Fl_Slider(x, y, w, h, l) 35 | { 36 | type(FL_HOR_FILL_SLIDER); 37 | 38 | labelsize(G_GUI_FONT_SIZE_BASE); 39 | align(FL_ALIGN_LEFT); 40 | labelcolor(G_COLOR_LIGHT_2); 41 | 42 | box(G_CUSTOM_BORDER_BOX); 43 | color(G_COLOR_GREY_2); 44 | selection_color(G_COLOR_GREY_4); 45 | } 46 | } // namespace giada::v -------------------------------------------------------------------------------- /src/gui/elems/basics/slider.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_SLIDER_H 28 | #define GE_SLIDER_H 29 | 30 | #include 31 | 32 | namespace giada::v 33 | { 34 | class geSlider : public Fl_Slider 35 | { 36 | public: 37 | geSlider(int x, int y, int w, int h, const char* l = nullptr); 38 | 39 | int id; 40 | }; 41 | } // namespace giada::v 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/gui/elems/basics/tabs.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "gui/elems/basics/tabs.h" 28 | #include "core/const.h" 29 | #include "gui/elems/basics/boxtypes.h" 30 | 31 | namespace giada::v 32 | { 33 | geTabs::geTabs(geompp::Rect r) 34 | : Fl_Tabs(r.x, r.y, r.w, r.h) 35 | { 36 | box(G_CUSTOM_BORDER_BOX); 37 | labelcolor(G_COLOR_LIGHT_2); 38 | end(); 39 | } 40 | 41 | /* -------------------------------------------------------------------------- */ 42 | 43 | void geTabs::add(Fl_Widget* wg) 44 | { 45 | constexpr int TAB_HEIGHT = 25; 46 | 47 | wg->resize(x(), y() + TAB_HEIGHT, w(), h() - TAB_HEIGHT); 48 | wg->labelsize(G_GUI_FONT_SIZE_BASE); 49 | wg->selection_color(G_COLOR_GREY_4); 50 | 51 | Fl_Tabs::add(wg); 52 | resizable(wg); // To keep the tab height constant during resizing 53 | } 54 | } // namespace giada::v 55 | -------------------------------------------------------------------------------- /src/gui/elems/basics/tabs.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_TABS_H 28 | #define GE_TABS_H 29 | 30 | #include "deps/geompp/src/rect.hpp" 31 | #include 32 | 33 | namespace giada::v 34 | { 35 | class geTabs : public Fl_Tabs 36 | { 37 | public: 38 | geTabs(geompp::Rect); 39 | 40 | void add(Fl_Widget*); 41 | }; 42 | } // namespace giada::v 43 | 44 | #endif -------------------------------------------------------------------------------- /src/gui/elems/basics/textButton.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * geButton 6 | * A regular button. 7 | * 8 | * ----------------------------------------------------------------------------- 9 | * 10 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 11 | * 12 | * This file is part of Giada - Your Hardcore Loopmachine. 13 | * 14 | * Giada - Your Hardcore Loopmachine is free software: you can 15 | * redistribute it and/or modify it under the terms of the GNU General 16 | * Public License as published by the Free Software Foundation, either 17 | * version 3 of the License, or (at your option) any later version. 18 | * 19 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 20 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 21 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 22 | * See the GNU General Public License for more details. 23 | * 24 | * You should have received a copy of the GNU General Public License 25 | * along with Giada - Your Hardcore Loopmachine. If not, see 26 | * . 27 | * 28 | * -------------------------------------------------------------------------- */ 29 | 30 | #ifndef GE_TEXT_BUTTON_H 31 | #define GE_TEXT_BUTTON_H 32 | 33 | #include "gui/elems/basics/button.h" 34 | 35 | namespace giada::v 36 | { 37 | class geTextButton : public geButton 38 | { 39 | public: 40 | geTextButton(int x, int y, int w, int h, const char* l); 41 | geTextButton(const char* l); 42 | 43 | void draw() override; 44 | 45 | protected: 46 | Fl_Color m_backgroundColorOff; 47 | Fl_Color m_backgroundColorOn; 48 | Fl_Color m_borderColor; 49 | Fl_Color m_textColor; 50 | }; 51 | } // namespace giada::v 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /src/gui/elems/config/stringMenu.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_STRING_MENU_H 28 | #define GE_STRING_MENU_H 29 | 30 | #include "gui/elems/basics/choice.h" 31 | #include 32 | #include 33 | 34 | namespace giada::v 35 | { 36 | class geStringMenu : public geChoice 37 | { 38 | public: 39 | geStringMenu(const char* l, const std::string& msgIfNotFound, int labelWidth); 40 | geStringMenu(const std::string& msgIfNotFound); 41 | 42 | void rebuild(const std::vector& data); 43 | 44 | private: 45 | std::string m_msgIfNotFound; 46 | }; 47 | } // namespace giada::v 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /src/gui/elems/config/tabBehaviors.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_TAB_BEHAVIORS_H 28 | #define GE_TAB_BEHAVIORS_H 29 | 30 | #include "deps/geompp/src/rect.hpp" 31 | #include "glue/config.h" 32 | #include "gui/elems/basics/check.h" 33 | #include 34 | 35 | namespace giada::v 36 | { 37 | class geTabBehaviors : public Fl_Group 38 | { 39 | public: 40 | geTabBehaviors(geompp::Rect); 41 | 42 | private: 43 | c::config::BehaviorsData m_data; 44 | 45 | geCheck* m_chansStopOnSeqHalt; 46 | geCheck* m_treatRecsAsLoops; 47 | geCheck* m_inputMonitorDefaultOn; 48 | geCheck* m_overdubProtectionDefaultOn; 49 | }; 50 | } // namespace giada::v 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/gui/elems/config/tabBindings.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_CONFIG_TAB_BINDINGS_H 28 | #define GE_CONFIG_TAB_BINDINGS_H 29 | 30 | #include "deps/geompp/src/rect.hpp" 31 | #include "gui/model.h" 32 | #include 33 | 34 | namespace giada::v 35 | { 36 | class geCheck; 37 | class geInput; 38 | class geKeyBinder; 39 | class geTabBindings : public Fl_Group 40 | { 41 | public: 42 | geTabBindings(geompp::Rect, const Model&); 43 | 44 | private: 45 | geKeyBinder* play; 46 | geKeyBinder* rewind; 47 | geKeyBinder* recordActions; 48 | geKeyBinder* recordInput; 49 | geKeyBinder* exit; 50 | }; 51 | } // namespace giada::v 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /src/gui/elems/config/tabMisc.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_TAB_MISC_H 28 | #define GE_TAB_MISC_H 29 | 30 | #include "deps/geompp/src/rect.hpp" 31 | #include "glue/config.h" 32 | #include 33 | 34 | namespace giada::v 35 | { 36 | class geChoice; 37 | class geStringMenu; 38 | class geTabMisc : public Fl_Group 39 | { 40 | public: 41 | geTabMisc(geompp::Rect); 42 | 43 | void save(); 44 | 45 | private: 46 | c::config::MiscData m_data; 47 | 48 | geChoice* m_debugMsg; 49 | geChoice* m_tooltips; 50 | geStringMenu* m_langMap; 51 | geChoice* m_uiScaling; 52 | }; 53 | } // namespace giada::v 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /src/gui/elems/config/tabPlugins.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_TAB_PLUGINS_H 28 | #define GE_TAB_PLUGINS_H 29 | 30 | #include "deps/geompp/src/rect.hpp" 31 | #include "glue/config.h" 32 | #include 33 | 34 | namespace giada::v 35 | { 36 | class geInput; 37 | class geImageButton; 38 | class geTextButton; 39 | class geTabPlugins : public Fl_Group 40 | { 41 | public: 42 | geTabPlugins(geompp::Rect); 43 | 44 | void save(); 45 | void rebuild(); 46 | 47 | private: 48 | c::config::PluginData m_data; 49 | 50 | geImageButton* m_browse; 51 | geInput* m_folderPath; 52 | geTextButton* m_scanButton; 53 | }; 54 | } // namespace giada::v 55 | 56 | #endif -------------------------------------------------------------------------------- /src/gui/elems/keyBinder.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_KEY_BINDER_H 28 | #define GE_KEY_BINDER_H 29 | 30 | #include "gui/elems/basics/flex.h" 31 | #include 32 | #include 33 | 34 | namespace giada::v 35 | { 36 | class geBox; 37 | class geTextButton; 38 | class geKeyBinder : public geFlex 39 | { 40 | public: 41 | geKeyBinder(const std::string& l, int key); 42 | 43 | int getKey() const; 44 | 45 | std::function onKeyBound; 46 | 47 | private: 48 | int m_key; 49 | geBox* m_labelBox; 50 | geBox* m_keyBox; 51 | geTextButton* m_bindBtn; 52 | geTextButton* m_clearBtn; 53 | }; 54 | } // namespace giada::v 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /src/gui/elems/mainWindow/keyboard/channelButton.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_CHANNEL_BUTTON_H 28 | #define GE_CHANNEL_BUTTON_H 29 | 30 | #include "gui/elems/basics/textButton.h" 31 | 32 | namespace giada::c::channel 33 | { 34 | struct Data; 35 | } 36 | 37 | namespace giada::v 38 | { 39 | class geChannelButton : public geTextButton 40 | { 41 | public: 42 | geChannelButton(int x, int y, int w, int h, const c::channel::Data& d); 43 | 44 | virtual void refresh(); 45 | 46 | void draw() override; 47 | 48 | void setPlayMode(); 49 | void setEndingMode(); 50 | void setDefaultMode(const char* l = nullptr); 51 | void setInputRecordMode(); 52 | void setActionRecordMode(); 53 | 54 | protected: 55 | const c::channel::Data& m_channel; 56 | }; 57 | } // namespace giada::v 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /src/gui/elems/mainWindow/keyboard/channelProgress.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ge_status 6 | * 7 | * ----------------------------------------------------------------------------- 8 | * 9 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 10 | * 11 | * This file is part of Giada - Your Hardcore Loopmachine. 12 | * 13 | * Giada - Your Hardcore Loopmachine is free software: you can 14 | * redistribute it and/or modify it under the terms of the GNU General 15 | * Public License as published by the Free Software Foundation, either 16 | * version 3 of the License, or (at your option) any later version. 17 | * 18 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 19 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with Giada - Your Hardcore Loopmachine. If not, see 25 | * . 26 | * 27 | * -------------------------------------------------------------------------- */ 28 | 29 | #ifndef GE_CHANNEL_PROGRESS_H 30 | #define GE_CHANNEL_PROGRESS_H 31 | 32 | #include 33 | 34 | namespace giada::c::channel 35 | { 36 | struct Data; 37 | } 38 | namespace giada::v 39 | { 40 | class geChannelProgress : public Fl_Box 41 | { 42 | public: 43 | geChannelProgress(int x, int y, int w, int h, c::channel::Data& d); 44 | 45 | void draw() override; 46 | 47 | private: 48 | c::channel::Data& m_channel; 49 | }; 50 | } // namespace giada::v 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/gui/elems/mainWindow/keyboard/groupChannel.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2023 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_GROUP_CHANNEL_H 28 | #define GE_GROUP_CHANNEL_H 29 | 30 | #include "channel.h" 31 | #include "glue/channel.h" 32 | 33 | namespace giada::v 34 | { 35 | class geGroupChannel : public geChannel 36 | { 37 | public: 38 | geGroupChannel(c::channel::Data d); 39 | 40 | void resize(int x, int y, int w, int h) override; 41 | 42 | private: 43 | void openMenu(); 44 | }; 45 | } // namespace giada::v 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /src/gui/elems/mainWindow/keyboard/groupChannelButton.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "gui/elems/mainWindow/keyboard/groupChannelButton.h" 28 | #include "glue/channel.h" 29 | #include "gui/ui.h" 30 | #include 31 | 32 | extern giada::v::Ui* g_ui; 33 | 34 | namespace giada::v 35 | { 36 | geGroupChannelButton::geGroupChannelButton(const c::channel::Data& d) 37 | : geChannelButton(0, 0, 0, 0, d) 38 | { 39 | } 40 | 41 | /* -------------------------------------------------------------------------- */ 42 | 43 | void geGroupChannelButton::refresh() 44 | { 45 | const std::string l = m_channel.name.empty() ? g_ui->getI18Text(LangMap::MAIN_CHANNEL_DEFAULTGROUPNAME) : m_channel.name; 46 | copy_label(l.c_str()); 47 | redraw(); 48 | } 49 | } // namespace giada::v 50 | -------------------------------------------------------------------------------- /src/gui/elems/mainWindow/keyboard/groupChannelButton.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_GROUP_CHANNEL_BUTTON_H 28 | #define GE_GROUP_CHANNEL_BUTTON_H 29 | 30 | #include "gui/elems/mainWindow/keyboard/channelButton.h" 31 | 32 | namespace giada::v 33 | { 34 | class geGroupChannelButton : public geChannelButton 35 | { 36 | public: 37 | geGroupChannelButton(const c::channel::Data& d); 38 | 39 | void refresh() override; 40 | }; 41 | } // namespace giada::v 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/gui/elems/mainWindow/keyboard/midiChannel.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_MIDI_CHANNEL_H 28 | #define GE_MIDI_CHANNEL_H 29 | 30 | #include "channel.h" 31 | #include "channelButton.h" 32 | 33 | namespace giada::v 34 | { 35 | class geMidiChannel : public geChannel 36 | { 37 | public: 38 | geMidiChannel(int x, int y, int w, int h, c::channel::Data d); 39 | 40 | void resize(int x, int y, int w, int h) override; 41 | 42 | private: 43 | void openMenu(); 44 | }; 45 | } // namespace giada::v 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /src/gui/elems/mainWindow/keyboard/midiChannelButton.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_MIDI_CHANNEL_BUTTON_H 28 | #define GE_MIDI_CHANNEL_BUTTON_H 29 | 30 | #include "channelButton.h" 31 | 32 | namespace giada::v 33 | { 34 | class geMidiChannelButton : public geChannelButton 35 | { 36 | public: 37 | geMidiChannelButton(int x, int y, int w, int h, const c::channel::Data& d); 38 | 39 | void refresh() override; 40 | 41 | private: 42 | void refreshLabel(); 43 | }; 44 | } // namespace giada::v 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /src/gui/elems/mainWindow/keyboard/sampleChannel.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_SAMPLE_CHANNEL_H 28 | #define GE_SAMPLE_CHANNEL_H 29 | 30 | #include "channel.h" 31 | #include "glue/channel.h" 32 | 33 | namespace giada::v 34 | { 35 | class geImageButton; 36 | class geSampleChannelMode; 37 | class geSampleChannel : public geChannel 38 | { 39 | public: 40 | geSampleChannel(int x, int y, int w, int h, c::channel::Data d); 41 | 42 | void resize(int x, int y, int w, int h) override; 43 | void draw() override; 44 | 45 | void refresh() override; 46 | 47 | geSampleChannelMode* modeBox; 48 | geImageButton* readActionsBtn; 49 | 50 | private: 51 | void openMenu(); 52 | void readActions(); 53 | }; 54 | } // namespace giada::v 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /src/gui/elems/mainWindow/keyboard/sampleChannelButton.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_SAMPLE_CHANNEL_BUTTON_H 28 | #define GE_SAMPLE_CHANNEL_BUTTON_H 29 | 30 | #include "channelButton.h" 31 | 32 | namespace giada 33 | { 34 | namespace v 35 | { 36 | class geSampleChannelButton : public geChannelButton 37 | { 38 | public: 39 | geSampleChannelButton(int x, int y, int w, int h, const c::channel::Data& d); 40 | 41 | int handle(int e) override; 42 | 43 | void refresh() override; 44 | }; 45 | } // namespace v 46 | } // namespace giada 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /src/gui/elems/mainWindow/keyboard/sampleChannelMode.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ge_modeBox 6 | * 7 | * ----------------------------------------------------------------------------- 8 | * 9 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 10 | * 11 | * This file is part of Giada - Your Hardcore Loopmachine. 12 | * 13 | * Giada - Your Hardcore Loopmachine is free software: you can 14 | * redistribute it and/or modify it under the terms of the GNU General 15 | * Public License as published by the Free Software Foundation, either 16 | * version 3 of the License, or (at your option) any later version. 17 | * 18 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 19 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with Giada - Your Hardcore Loopmachine. If not, see 25 | * . 26 | * 27 | * -------------------------------------------------------------------------- */ 28 | 29 | #ifndef GE_SAMPLE_CHANNEL_MODE_H 30 | #define GE_SAMPLE_CHANNEL_MODE_H 31 | 32 | #include "gui/elems/basics/imageButton.h" 33 | 34 | namespace giada::c::channel 35 | { 36 | struct Data; 37 | } 38 | 39 | namespace giada::v 40 | { 41 | class geSampleChannelMode : public geImageButton 42 | { 43 | public: 44 | geSampleChannelMode(int x, int y, int w, int h, c::channel::Data& d); 45 | 46 | private: 47 | void refresh(); 48 | void openMenu(); 49 | 50 | c::channel::Data& m_channel; 51 | }; 52 | } // namespace giada::v 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /src/gui/elems/mainWindow/mainInput.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_MAIN_INPUT_H 28 | #define GE_MAIN_INPUT_H 29 | 30 | #include "glue/main.h" 31 | #include "gui/elems/basics/flex.h" 32 | 33 | namespace giada::v 34 | { 35 | class geDial; 36 | class geSoundMeter; 37 | class geImageButton; 38 | class geMidiLed; 39 | class geMainInput : public geFlex 40 | { 41 | public: 42 | geMainInput(); 43 | 44 | void refresh(); 45 | void rebuild(); 46 | 47 | void setInVol(float v); 48 | void setMidiInActivity(); 49 | 50 | private: 51 | c::main::IO m_io; 52 | 53 | geSoundMeter* m_inMeter; 54 | geDial* m_inVol; 55 | geImageButton* m_inToOut; 56 | geImageButton* m_masterFxIn; 57 | geMidiLed* m_midiIn; 58 | }; 59 | } // namespace giada::v 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /src/gui/elems/mainWindow/mainMenu.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_MAIN_MENU_H 28 | #define GE_MAIN_MENU_H 29 | 30 | #include 31 | 32 | namespace giada::v 33 | { 34 | class geMainMenu : public Fl_Sys_Menu_Bar 35 | { 36 | public: 37 | geMainMenu(); 38 | 39 | private: 40 | void cb_file(); 41 | void cb_edit(); 42 | }; 43 | } // namespace giada::v 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /src/gui/elems/mainWindow/mainOutput.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_MAIN_OUTPUT_H 28 | #define GE_MAIN_OUTPUT_H 29 | 30 | #include "glue/main.h" 31 | #include "gui/elems/basics/flex.h" 32 | 33 | namespace giada::v 34 | { 35 | class geDial; 36 | class geSoundMeter; 37 | class geTextButton; 38 | class geImageButton; 39 | class geMidiLed; 40 | class geMainOutput : public geFlex 41 | { 42 | public: 43 | geMainOutput(); 44 | 45 | void refresh(); 46 | void rebuild(); 47 | 48 | void setOutVol(float v); 49 | void setMidiOutActivity(); 50 | 51 | private: 52 | c::main::IO m_io; 53 | 54 | geSoundMeter* m_outMeter; 55 | geDial* m_outVol; 56 | geImageButton* m_masterFxOut; 57 | geMidiLed* m_midiOut; 58 | }; 59 | } // namespace giada::v 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /src/gui/elems/mainWindow/mainTransport.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_MAIN_TRANSPORT_H 28 | #define GE_MAIN_TRANSPORT_H 29 | 30 | #include "gui/elems/basics/flex.h" 31 | 32 | namespace giada::v 33 | { 34 | class geImageButton; 35 | class geMainTransport : public geFlex 36 | { 37 | public: 38 | geMainTransport(); 39 | 40 | void refresh(); 41 | 42 | private: 43 | geImageButton* m_rewind; 44 | geImageButton* m_play; 45 | geImageButton* m_recTriggerMode; 46 | geImageButton* m_recAction; 47 | geImageButton* m_recInput; 48 | geImageButton* m_inputRecMode; 49 | geImageButton* m_metronome; 50 | }; 51 | } // namespace giada::v 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /src/gui/elems/midiActivity.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_MIDI_ACTIVITY_H 28 | #define GE_MIDI_ACTIVITY_H 29 | 30 | #include "gui/elems/basics/flex.h" 31 | #include 32 | 33 | namespace giada::v 34 | { 35 | class geMidiLed : public Fl_Button 36 | { 37 | public: 38 | geMidiLed(); 39 | 40 | void draw() override; 41 | void lit(); 42 | 43 | private: 44 | int m_decay; 45 | }; 46 | 47 | /* -------------------------------------------------------------------------- */ 48 | 49 | class geMidiActivity : public geFlex 50 | { 51 | public: 52 | geMidiActivity(bool hasOut = true); 53 | 54 | geMidiLed* out; 55 | geMidiLed* in; 56 | }; 57 | } // namespace giada::v 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /src/gui/elems/panTool.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_PAN_TOOL_H 28 | #define GE_PAN_TOOL_H 29 | 30 | #include "core/types.h" 31 | #include "gui/elems/basics/flex.h" 32 | 33 | namespace giada::v 34 | { 35 | class geInput; 36 | class geDial; 37 | class geTextButton; 38 | class gePanTool : public geFlex 39 | { 40 | public: 41 | gePanTool(ID channelId, float pan, int labelWidth = 0); 42 | 43 | private: 44 | void update(float pan); 45 | 46 | ID m_channelId; 47 | 48 | geInput* m_input; 49 | geDial* m_dial; 50 | geTextButton* m_reset; 51 | }; 52 | } // namespace giada::v 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /src/gui/elems/plugin/pluginBrowser.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_PLUGIN_BROWSER_H 28 | #define GE_PLUGIN_BROWSER_H 29 | 30 | #include 31 | 32 | namespace giada::v 33 | { 34 | class gePluginBrowser : public Fl_Browser 35 | { 36 | public: 37 | gePluginBrowser(int x, int y, int w, int h); 38 | 39 | void refresh(); 40 | 41 | private: 42 | void computeWidths(); 43 | 44 | int m_widths[5]; 45 | }; 46 | } // namespace giada::v 47 | 48 | #endif -------------------------------------------------------------------------------- /src/gui/elems/plugin/pluginParameter.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_PLUGIN_PARAMETER_H 28 | #define GE_PLUGIN_PARAMETER_H 29 | 30 | #include "core/types.h" 31 | #include "glue/plugin.h" 32 | #include 33 | 34 | namespace giada::v 35 | { 36 | class geSlider; 37 | class geBox; 38 | class gePluginParameter : public Fl_Group 39 | { 40 | public: 41 | gePluginParameter(int x, int y, int w, int labelWidth, const c::plugin::Param); 42 | 43 | void update(const c::plugin::Param& p, bool changeSlider); 44 | 45 | private: 46 | static void cb_setValue(Fl_Widget* /*w*/, void* p); 47 | void cb_setValue(); 48 | 49 | const c::plugin::Param m_param; 50 | 51 | geBox* m_label; 52 | geSlider* m_slider; 53 | geBox* m_value; 54 | }; 55 | } // namespace giada::v 56 | 57 | #endif -------------------------------------------------------------------------------- /src/gui/elems/sampleEditor/rangeTool.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_RANGE_TOOL_H 28 | #define GE_RANGE_TOOL_H 29 | 30 | #include "core/types.h" 31 | #include "gui/elems/basics/flex.h" 32 | 33 | namespace giada::c::sampleEditor 34 | { 35 | struct Data; 36 | } 37 | 38 | namespace giada::v 39 | { 40 | class geInput; 41 | class geBox; 42 | class geTextButton; 43 | class geRangeTool : public geFlex 44 | { 45 | public: 46 | geRangeTool(const c::sampleEditor::Data& d); 47 | 48 | void rebuild(const c::sampleEditor::Data& d); 49 | void update(Frame begin, Frame end); 50 | 51 | private: 52 | const c::sampleEditor::Data* m_data; 53 | 54 | geBox* m_label; 55 | geInput* m_begin; 56 | geInput* m_end; 57 | geTextButton* m_reset; 58 | }; 59 | } // namespace giada::v 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /src/gui/elems/sampleEditor/shiftTool.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_SHIFT_TOOL_H 28 | #define GE_SHIFT_TOOL_H 29 | 30 | #include "core/types.h" 31 | #include "gui/elems/basics/flex.h" 32 | 33 | namespace giada::c::sampleEditor 34 | { 35 | struct Data; 36 | } 37 | 38 | namespace giada::v 39 | { 40 | class geInput; 41 | class geBox; 42 | class geTextButton; 43 | class geShiftTool : public geFlex 44 | { 45 | public: 46 | geShiftTool(const c::sampleEditor::Data& d); 47 | 48 | void rebuild(const c::sampleEditor::Data& d); 49 | void update(Frame shift); 50 | 51 | private: 52 | const c::sampleEditor::Data* m_data; 53 | 54 | geBox* m_label; 55 | geInput* m_shift; 56 | geTextButton* m_reset; 57 | }; 58 | } // namespace giada::v 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /src/gui/elems/soundMeter.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_SOUND_METER_H 28 | #define GE_SOUND_METER_H 29 | 30 | #include "core/types.h" 31 | #include "gui/types.h" 32 | #include 33 | 34 | namespace giada::v 35 | { 36 | class geSoundMeter : public Fl_Box 37 | { 38 | public: 39 | geSoundMeter(Direction); 40 | 41 | void draw() override; 42 | 43 | Peak peak; // Peak from Mixer 44 | bool ready; // Kernel state 45 | 46 | private: 47 | class Meter 48 | { 49 | public: 50 | float compute(float peak); 51 | 52 | private: 53 | float m_dbLevelOld = 0.0f; 54 | }; 55 | 56 | Direction m_direction; 57 | Meter m_left; 58 | Meter m_right; 59 | }; 60 | } // namespace giada::v 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /src/gui/elems/volumeTool.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef GE_VOLUME_TOOL_H 28 | #define GE_VOLUME_TOOL_H 29 | 30 | #include "core/types.h" 31 | #include "gui/elems/basics/flex.h" 32 | 33 | namespace giada::v 34 | { 35 | class geDial; 36 | class geInput; 37 | class geTextButton; 38 | class geVolumeTool : public geFlex 39 | { 40 | public: 41 | geVolumeTool(ID channelId, float volume, int labelWidth = 0); 42 | 43 | private: 44 | void update(float volume, bool fromDial = false); 45 | 46 | ID m_channelId; 47 | 48 | geInput* m_input; 49 | geDial* m_dial; 50 | geTextButton* m_reset; 51 | }; 52 | } // namespace giada::v 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /src/gui/types.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_V_TYPES_H 28 | #define G_V_TYPES_H 29 | 30 | namespace giada::v 31 | { 32 | enum class Direction 33 | { 34 | HORIZONTAL, 35 | VERTICAL 36 | }; 37 | } // namespace giada::v 38 | 39 | #endif -------------------------------------------------------------------------------- /src/gui/updater.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_V_UPDATER_H 28 | #define G_V_UPDATER_H 29 | 30 | #include "deps/concurrentqueue/concurrentqueue.h" 31 | #include 32 | #include 33 | 34 | namespace giada::v 35 | { 36 | class Ui; 37 | class Updater final 38 | { 39 | public: 40 | using Event = std::function; 41 | 42 | Updater(Ui& ui); 43 | 44 | void start(); 45 | void stop(); 46 | void run(); 47 | bool pumpEvent(const Event&); 48 | 49 | private: 50 | static void update(void*); 51 | void update(); 52 | 53 | Ui& m_ui; 54 | 55 | moodycamel::ConcurrentQueue m_eventQueue; 56 | }; 57 | } // namespace giada::v 58 | 59 | #endif -------------------------------------------------------------------------------- /src/main.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "core/engine.h" 28 | #include "gui/ui.h" 29 | 30 | giada::m::Engine* g_engine = nullptr; 31 | giada::v::Ui* g_ui = nullptr; 32 | 33 | int main(int argc, char** argv) 34 | { 35 | using namespace giada; 36 | 37 | if (int ret = m::init::tests(argc, argv); ret != -1) 38 | return ret; 39 | 40 | auto enginePtr = std::make_unique(); 41 | auto uiPtr = std::make_unique(); 42 | 43 | g_engine = enginePtr.get(); 44 | g_ui = uiPtr.get(); 45 | 46 | m::init::startup(); 47 | m::init::run(); 48 | 49 | return 0; 50 | } -------------------------------------------------------------------------------- /src/utils/cocoa.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * cocoa 6 | * 7 | * ----------------------------------------------------------------------------- 8 | * 9 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 10 | * 11 | * This file is part of Giada - Your Hardcore Loopmachine. 12 | * 13 | * Giada - Your Hardcore Loopmachine is free software: you can 14 | * redistribute it and/or modify it under the terms of the GNU General 15 | * Public License as published by the Free Software Foundation, either 16 | * version 3 of the License, or (at your option) any later version. 17 | * 18 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 19 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with Giada - Your Hardcore Loopmachine. If not, see 25 | * . 26 | * 27 | * -------------------------------------------------------------------------- */ 28 | 29 | #ifndef G_UTILS_COCOA_H 30 | #define G_UTILS_COCOA_H 31 | 32 | /* fl_xid() from FLTK returns a pointer to NSWindow, but plugins on OS X want a 33 | pointer to NSView. The function does the hard conversion. */ 34 | 35 | void* cocoa_getViewFromWindow(void* p); 36 | 37 | /* A bug on on OS X seems to misalign plugins' UI. The function takes care of 38 | fixing the positioning. 39 | TODO temporarily disabled: it does not work. */ 40 | 41 | // void cocoa_setWindowSize(void *p, int w, int h); 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/utils/cocoa.mm: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * cocoa 6 | * 7 | * ----------------------------------------------------------------------------- 8 | * 9 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 10 | * 11 | * This file is part of Giada - Your Hardcore Loopmachine. 12 | * 13 | * Giada - Your Hardcore Loopmachine is free software: you can 14 | * redistribute it and/or modify it under the terms of the GNU General 15 | * Public License as published by the Free Software Foundation, either 16 | * version 3 of the License, or (at your option) any later version. 17 | * 18 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 19 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with Giada - Your Hardcore Loopmachine. If not, see 25 | * . 26 | * 27 | * -------------------------------------------------------------------------- */ 28 | 29 | 30 | #import 31 | #import 32 | #import "cocoa.h" 33 | 34 | 35 | void* cocoa_getViewFromWindow(void* p) 36 | { 37 | NSWindow* win = (NSWindow* ) p; 38 | return (void*) win.contentView; 39 | } 40 | 41 | /* 42 | void cocoa_setWindowSize(void *p, int w, int h) 43 | { 44 | NSWindow *win = (NSWindow *) p; 45 | [win setContentSize:NSMakeSize(w, h)]; 46 | } 47 | */ -------------------------------------------------------------------------------- /src/utils/log.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * log 6 | * 7 | * ----------------------------------------------------------------------------- 8 | * 9 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 10 | * 11 | * This file is part of Giada - Your Hardcore Loopmachine. 12 | * 13 | * Giada - Your Hardcore Loopmachine is free software: you can 14 | * redistribute it and/or modify it under the terms of the GNU General 15 | * Public License as published by the Free Software Foundation, either 16 | * version 3 of the License, or (at your option) any later version. 17 | * 18 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 19 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with Giada - Your Hardcore Loopmachine. If not, see 25 | * . 26 | * 27 | * -------------------------------------------------------------------------- */ 28 | 29 | #include "log.h" 30 | #include 31 | #include 32 | 33 | namespace giada::u::log 34 | { 35 | bool init(int m) 36 | { 37 | mode = m; 38 | if (mode == LOG_MODE_FILE) 39 | { 40 | std::string fpath = u::fs::join(fs::getConfigDirPath(), "giada.log"); 41 | file.open(fpath, std::fstream::out | std::fstream::app); 42 | if (!file.is_open()) 43 | return false; 44 | } 45 | return true; 46 | } 47 | 48 | /* -------------------------------------------------------------------------- */ 49 | 50 | void close() 51 | { 52 | if (mode == LOG_MODE_FILE) 53 | file.close(); 54 | } 55 | } // namespace giada::u::log 56 | -------------------------------------------------------------------------------- /src/utils/math.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #include "math.h" 28 | #include 29 | 30 | namespace giada 31 | { 32 | namespace u 33 | { 34 | namespace math 35 | { 36 | float linearToDB(float f) 37 | { 38 | return 20 * std::log10(f); 39 | } 40 | 41 | /* -------------------------------------------------------------------------- */ 42 | 43 | int quantize(int x, int step) 44 | { 45 | /* Source: 46 | https://en.wikipedia.org/wiki/Quantization_(signal_processing)#Rounding_example */ 47 | return step * std::floor((x / (float)step) + 0.5f); 48 | } 49 | 50 | /* -------------------------------------------------------------------------- */ 51 | 52 | float dBtoLinear(float f) 53 | { 54 | return std::pow(10, f / 20.0f); 55 | } 56 | 57 | } // namespace math 58 | } // namespace u 59 | } // namespace giada -------------------------------------------------------------------------------- /src/utils/time.cpp: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * utils 6 | * 7 | * ----------------------------------------------------------------------------- 8 | * 9 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 10 | * 11 | * This file is part of Giada - Your Hardcore Loopmachine. 12 | * 13 | * Giada - Your Hardcore Loopmachine is free software: you can 14 | * redistribute it and/or modify it under the terms of the GNU General 15 | * Public License as published by the Free Software Foundation, either 16 | * version 3 of the License, or (at your option) any later version. 17 | * 18 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 19 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with Giada - Your Hardcore Loopmachine. If not, see 25 | * . 26 | * 27 | * -------------------------------------------------------------------------- */ 28 | 29 | #include "time.h" 30 | #include 31 | #include 32 | 33 | namespace giada::u::time 34 | { 35 | void sleep(int millisecs) 36 | { 37 | std::this_thread::sleep_for(std::chrono::milliseconds(millisecs)); 38 | } 39 | 40 | /* -------------------------------------------------------------------------- */ 41 | 42 | Frame beatToFrame(int beat, int sampleRate, float bpm) 43 | { 44 | return static_cast((sampleRate * (60.0f / bpm)) * beat); 45 | } 46 | 47 | /* -------------------------------------------------------------------------- */ 48 | 49 | int frameToBeat(Frame frame, int sampleRate, float bpm) 50 | { 51 | return static_cast(frame / (sampleRate * (60.0f / bpm))); 52 | } 53 | } // namespace giada::u::time 54 | -------------------------------------------------------------------------------- /src/utils/time.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * utils 6 | * 7 | * ----------------------------------------------------------------------------- 8 | * 9 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 10 | * 11 | * This file is part of Giada - Your Hardcore Loopmachine. 12 | * 13 | * Giada - Your Hardcore Loopmachine is free software: you can 14 | * redistribute it and/or modify it under the terms of the GNU General 15 | * Public License as published by the Free Software Foundation, either 16 | * version 3 of the License, or (at your option) any later version. 17 | * 18 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 19 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with Giada - Your Hardcore Loopmachine. If not, see 25 | * . 26 | * 27 | * -------------------------------------------------------------------------- */ 28 | 29 | #ifndef G_UTILS_TIME_H 30 | #define G_UTILS_TIME_H 31 | 32 | #include "core/types.h" 33 | 34 | namespace giada::u::time 35 | { 36 | void sleep(int millisecs); 37 | 38 | /* beatToFrame 39 | Returns the frame a beat corresponds to. */ 40 | 41 | Frame beatToFrame(int beat, int sampleRate, float bpm); 42 | 43 | /* frameToBeat 44 | Returns the beat a frame corresponds to. */ 45 | 46 | int frameToBeat(Frame frame, int sampleRate, float bpm); 47 | } // namespace giada::u::time 48 | 49 | #endif -------------------------------------------------------------------------------- /src/utils/ver.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * 3 | * Giada - Your Hardcore Loopmachine 4 | * 5 | * ----------------------------------------------------------------------------- 6 | * 7 | * Copyright (C) 2010-2025 Giovanni A. Zuliani | Monocasual Laboratories 8 | * 9 | * This file is part of Giada - Your Hardcore Loopmachine. 10 | * 11 | * Giada - Your Hardcore Loopmachine is free software: you can 12 | * redistribute it and/or modify it under the terms of the GNU General 13 | * Public License as published by the Free Software Foundation, either 14 | * version 3 of the License, or (at your option) any later version. 15 | * 16 | * Giada - Your Hardcore Loopmachine is distributed in the hope that it 17 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with Giada - Your Hardcore Loopmachine. If not, see 23 | * . 24 | * 25 | * -------------------------------------------------------------------------- */ 26 | 27 | #ifndef G_UTILS_VER_H 28 | #define G_UTILS_VER_H 29 | 30 | #include 31 | 32 | namespace giada 33 | { 34 | namespace u 35 | { 36 | namespace ver 37 | { 38 | std::string getLibsndfileVersion(); 39 | std::string getRtAudioVersion(); 40 | std::string getRtMidiVersion(); 41 | } // namespace ver 42 | } // namespace u 43 | } // namespace giada 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /tests/channelFactory.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "../src/core/channels/channelFactory.h" 3 | #include "../src/core/types.h" 4 | #include 5 | 6 | using std::string; 7 | using namespace giada; 8 | using namespace giada::m; 9 | 10 | TEST_CASE("channelFactory") 11 | { 12 | SECTION("test creation") 13 | { 14 | channelFactory::Data data = channelFactory::create( 15 | /*id=*/0, 16 | ChannelType::SAMPLE, 17 | /*bufferSize=*/1024, 18 | Resampler::Quality::LINEAR, 19 | /*overdubProtection=*/false); 20 | 21 | REQUIRE(data.channel.id != 0); // If ID == 0, must be auto-generated 22 | REQUIRE(data.channel.type == ChannelType::SAMPLE); 23 | 24 | SECTION("test clone") 25 | { 26 | channelFactory::Data clone = channelFactory::create(data.channel, /*bufferSize=*/1024, Resampler::Quality::LINEAR); 27 | 28 | REQUIRE(clone.channel.id != data.channel.id); // Clone must have new ID 29 | REQUIRE(clone.channel.type == data.channel.type); 30 | REQUIRE(clone.channel.volume == data.channel.volume); 31 | REQUIRE(clone.channel.pan == data.channel.pan); 32 | REQUIRE(clone.channel.armed == data.channel.armed); 33 | REQUIRE(clone.channel.key == data.channel.key); 34 | REQUIRE(clone.channel.hasActions == data.channel.hasActions); 35 | REQUIRE(clone.channel.name == data.channel.name); 36 | REQUIRE(clone.channel.height == data.channel.height); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /tests/main.cpp: -------------------------------------------------------------------------------- 1 | #define CATCH_CONFIG_MAIN 2 | #define CATCH_CONFIG_FAST_COMPILE 3 | #include -------------------------------------------------------------------------------- /tests/midiEvent.cpp: -------------------------------------------------------------------------------- 1 | #include "../src/core/midiEvent.h" 2 | #include "../src/utils/math.h" 3 | #include 4 | 5 | TEST_CASE("MidiEvent") 6 | { 7 | using namespace giada::m; 8 | 9 | constexpr uint32_t raw = 0x912C5000; // Note on, channel 1, key 44 (0x2C), velocity 80 (0x50) 10 | 11 | SECTION("Test Channel message") 12 | { 13 | MidiEvent e = MidiEvent::makeFromRaw(raw, /*numBytes=*/3, /*timestamp=*/0.0); 14 | 15 | REQUIRE(e.getRaw() == raw); 16 | REQUIRE(e.getRawNoVelocity() == 0x912C0000); 17 | REQUIRE(e.getType() == MidiEvent::Type::CHANNEL); 18 | REQUIRE(e.getNumBytes() == 3); 19 | REQUIRE(e.getStatus() == 0x90); 20 | REQUIRE(e.getChannel() == 1); 21 | REQUIRE(e.getNote() == 44); 22 | REQUIRE(e.getVelocity() == 80); 23 | REQUIRE(e.getByte1() == 0x91); 24 | REQUIRE(e.getByte2() == 0x2C); 25 | REQUIRE(e.getByte3() == 0x50); 26 | } 27 | 28 | SECTION("Test get/set properties") 29 | { 30 | MidiEvent e = MidiEvent::makeFromRaw(raw, /*numBytes=*/3, /*timestamp=*/0.0); 31 | 32 | SECTION("Test velocity") 33 | { 34 | e.setVelocity(33); 35 | REQUIRE(e.getChannel() == 1); 36 | REQUIRE(e.getNote() == 44); 37 | REQUIRE(e.getVelocity() == 33); 38 | REQUIRE(e.getVelocityFloat() == u::math::map(33, G_MAX_VELOCITY, G_MAX_VELOCITY_FLOAT)); 39 | 40 | e.setVelocityFloat(0.4f); 41 | REQUIRE(e.getVelocity() == u::math::map(0.4f, G_MAX_VELOCITY_FLOAT, G_MAX_VELOCITY)); 42 | REQUIRE(e.getVelocityFloat() == 0.4f); 43 | } 44 | 45 | SECTION("Test channel") 46 | { 47 | e.setChannel(4); 48 | REQUIRE(e.getChannel() == 4); 49 | REQUIRE(e.getNote() == 44); 50 | REQUIRE(e.getVelocity() == 80); 51 | REQUIRE(e.getVelocityFloat() == u::math::map(80, G_MAX_VELOCITY, G_MAX_VELOCITY_FLOAT)); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /tests/mocks/kernelMidiMock.h: -------------------------------------------------------------------------------- 1 | #ifndef G_TESTS_KERNELMIDI_MOCK_H 2 | #define G_TESTS_KERNELMIDI_MOCK_H 3 | 4 | #include "../../src/core/midiEvent.h" 5 | 6 | namespace giada::m 7 | { 8 | class KernelMidiMock 9 | { 10 | public: 11 | void send(const MidiEvent& e) 12 | { 13 | sent.push_back(e); 14 | } 15 | 16 | std::vector sent; 17 | }; 18 | } // namespace giada::m 19 | 20 | #endif -------------------------------------------------------------------------------- /tests/patch.cpp: -------------------------------------------------------------------------------- 1 | #include "../src/core/patch.h" 2 | #include 3 | 4 | TEST_CASE("Patch") 5 | { 6 | using namespace giada; 7 | 8 | SECTION("version") 9 | { 10 | Patch patch; 11 | patch.version = {0, 16, 0}; 12 | 13 | REQUIRE(patch.version < Patch::Version{1, 0, 0}); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /tests/resources/test.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monocasual/giada/e495a0224a31b94da752d363f5e9207979bfdea5/tests/resources/test.wav -------------------------------------------------------------------------------- /tests/wave.cpp: -------------------------------------------------------------------------------- 1 | #include "../src/core/wave.h" 2 | #include 3 | #include 4 | 5 | TEST_CASE("Wave") 6 | { 7 | using namespace giada; 8 | 9 | static const int SAMPLE_RATE = 44100; 10 | static const int BUFFER_SIZE = 4096; 11 | static const int CHANNELS = 2; 12 | static const int BIT_DEPTH = 32; 13 | 14 | /* Each SECTION the TEST_CASE is executed from the start. Any code between 15 | this comment and the first SECTION macro is executed before each SECTION. */ 16 | 17 | SECTION("test allocation") 18 | { 19 | m::Wave wave(1); 20 | wave.alloc(BUFFER_SIZE, CHANNELS, SAMPLE_RATE, BIT_DEPTH, "path/to/sample.wav"); 21 | 22 | SECTION("test basename") 23 | { 24 | REQUIRE(wave.getPath() == "path/to/sample.wav"); 25 | REQUIRE(wave.getBasename() == "sample"); 26 | REQUIRE(wave.getBasename(true) == "sample.wav"); 27 | } 28 | 29 | SECTION("test path") 30 | { 31 | wave.setPath("path/is/now/different.mp3"); 32 | 33 | REQUIRE(wave.getPath() == "path/is/now/different.mp3"); 34 | 35 | wave.setPath("path/is/now/different.mp3", 5); 36 | 37 | REQUIRE(wave.getPath() == "path/is/now/different-5.mp3"); 38 | } 39 | 40 | SECTION("test change name") 41 | { 42 | REQUIRE(wave.getPath() == "path/to/sample.wav"); 43 | REQUIRE(wave.getBasename() == "sample"); 44 | REQUIRE(wave.getBasename(true) == "sample.wav"); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /tests/waveReading.cpp: -------------------------------------------------------------------------------- 1 | #include "../src/core/resampler.h" 2 | #include "../src/core/wave.h" 3 | #include "../src/utils/vector.h" 4 | #include "src/core/rendering/sampleRendering.h" 5 | #include 6 | #include 7 | 8 | TEST_CASE("WaveReading") 9 | { 10 | using namespace giada; 11 | 12 | constexpr int BUFFER_SIZE = 1024; 13 | constexpr int NUM_CHANNELS = 2; 14 | 15 | m::Wave wave(0); 16 | wave.getBuffer().alloc(BUFFER_SIZE, NUM_CHANNELS); 17 | wave.getBuffer().forEachFrame([](float* f, int i) { 18 | f[0] = static_cast(i + 1); 19 | f[1] = static_cast(i + 1); 20 | }); 21 | m::Resampler resampler; 22 | 23 | SECTION("Test fill, pitch 1.0") 24 | { 25 | mcl::AudioBuffer out(BUFFER_SIZE, NUM_CHANNELS); 26 | 27 | SECTION("Regular fill") 28 | { 29 | m::rendering::ReadResult res = rendering::readWave(wave, out, 30 | /*start=*/0, BUFFER_SIZE, /*offset=*/0, /*pitch=*/1.0f, resampler); 31 | 32 | bool allFilled = true; 33 | int numFramesFilled = 0; 34 | out.forEachFrame([&allFilled, &numFramesFilled](const float* f, int) { 35 | if (f[0] == 0.0f) 36 | allFilled = false; 37 | else 38 | numFramesFilled++; 39 | }); 40 | 41 | REQUIRE(allFilled); 42 | REQUIRE(numFramesFilled == res.used); 43 | REQUIRE(numFramesFilled == res.generated); 44 | } 45 | 46 | SECTION("Partial fill") 47 | { 48 | m::rendering::ReadResult res = rendering::readWave(wave, out, 49 | /*start=*/0, BUFFER_SIZE, /*offset=*/BUFFER_SIZE / 2, /*pitch=*/1.0f, resampler); 50 | 51 | int numFramesFilled = 0; 52 | out.forEachFrame([&numFramesFilled](const float* f, int) { 53 | if (f[0] != 0.0f) 54 | numFramesFilled++; 55 | }); 56 | 57 | REQUIRE(numFramesFilled == BUFFER_SIZE / 2); 58 | REQUIRE(out[(BUFFER_SIZE / 2) - 1][0] == 0.0f); 59 | REQUIRE(out[BUFFER_SIZE / 2][0] != 0.0f); 60 | REQUIRE(numFramesFilled == res.used); 61 | REQUIRE(numFramesFilled == res.generated); 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /vcpkg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "giada", 3 | "version-string": "1.0", 4 | "builtin-baseline": "f6a5d4e8eb7476b8d7fc12a56dff300c1c986131", 5 | "dependencies": [ 6 | { 7 | "name": "rtmidi", 8 | "version>=": "5.0.0#2", 9 | "platform": "linux", 10 | "features": [ 11 | "alsa" 12 | ] 13 | }, 14 | { 15 | "name": "rtmidi", 16 | "version>=": "5.0.0", 17 | "platform": "!linux" 18 | }, 19 | { 20 | "name": "fmt", 21 | "version>=": "10.0.0" 22 | }, 23 | { 24 | "name": "catch2", 25 | "version>=": "2.13.8" 26 | }, 27 | { 28 | "name": "libsamplerate", 29 | "version>=": "0.2.2" 30 | }, 31 | { 32 | "name": "nlohmann-json", 33 | "version>=": "3.11.2" 34 | }, 35 | { 36 | "name": "libsndfile", 37 | "version>=": "1.2.0", 38 | "features": [ 39 | "external-libs" 40 | ] 41 | } 42 | ], 43 | "overrides": [ 44 | { 45 | "name": "fmt", 46 | "version": "10.0.0" 47 | }, 48 | { 49 | "name": "catch2", 50 | "version": "2.13.8" 51 | }, 52 | { 53 | "name": "libsamplerate", 54 | "version": "0.2.2" 55 | }, 56 | { 57 | "name": "nlohmann-json", 58 | "version": "3.11.2" 59 | }, 60 | { 61 | "name": "libsndfile", 62 | "version": "1.2.0" 63 | } 64 | ] 65 | } --------------------------------------------------------------------------------