├── .gitignore
├── BOops.ttl
├── BOops_BMusic_-_Antimatter.ttl
├── BOops_BMusic_-_Arctic_resonance.ttl
├── BOops_BMusic_-_Beam_me_up.ttl
├── BOops_BMusic_-_Bobble_wobble.ttl
├── BOops_BMusic_-_Chaos_theory.ttl
├── BOops_BMusic_-_Cross_fire.ttl
├── BOops_BMusic_-_Dizzy_tizzy.ttl
├── BOops_BMusic_-_Fade_to_grey.ttl
├── BOops_BMusic_-_Game_over.ttl
├── BOops_BMusic_-_Grannys_vinyl.ttl
├── BOops_BMusic_-_Grumpy_Bernie.ttl
├── BOops_BMusic_-_Leap_in_time.ttl
├── BOops_BMusic_-_Loopodelic.ttl
├── BOops_BMusic_-_Message_from_outerspace.ttl
├── BOops_BMusic_-_Raising_voltage.ttl
├── BOops_BMusic_-_Steel_punk.ttl
├── BOops_BMusic_-_Sudden_1.ttl
├── BOops_BMusic_-_Sudden_2.ttl
├── BOops_BMusic_-_Through_the_intestine.ttl
├── BOops_Fusterclucker_-_EDM_glitch_(4_bar).ttl
├── LICENSE
├── README.md
├── doc
├── keys_mode.png
├── midi_control_pattern.png
├── midi_controlled.png
├── pattern.png
├── pattern_mode.png
├── pattern_tabs.png
├── screenshot.png
├── shape_mode.png
└── slots.png
├── inc
├── Amp.png
├── Amp.svg
├── Amp16.png
├── Amp16.svg
├── Amp_bg.png
├── Amp_bg.svg
├── Balance.png
├── Balance.svg
├── Balance16.png
├── Balance16.svg
├── Banger.png
├── Banger.svg
├── Banger16.png
├── Banger16.svg
├── Bitcrush.png
├── Bitcrush.svg
├── Bitcrush16.png
├── Bitcrush16.svg
├── Chop_bg.png
├── Chop_bg.svg
├── Chopper.png
├── Chopper.svg
├── Chopper16.png
├── Chopper16.svg
├── Crackles.png
├── Crackles.svg
├── Crackles16.png
├── Crackles16.svg
├── Decimate.png
├── Decimate.svg
├── Decimate16.png
├── Decimate16.svg
├── Delay.png
├── Delay.svg
├── Delay16.png
├── Delay16.svg
├── Delay_bg.png
├── Delay_bg.svg
├── Distortion.png
├── Distortion.svg
├── Distortion16.png
├── Distortion16.svg
├── Distortion_bg.png
├── Distortion_bg.svg
├── Distortion_bg2.svg
├── EQ.png
├── EQ.svg
├── EQ16.png
├── EQ16.svg
├── Filter.png
├── Filter.svg
├── Filter16.png
├── Filter16.svg
├── Flanger.png
├── Flanger.svg
├── Flanger16.png
├── Flanger16.svg
├── Flanger_bg.png
├── Flanger_bg.svg
├── Galactic.png
├── Galactic.svg
├── Galactic16.png
├── Galactic16.svg
├── Infinity.png
├── Infinity.svg
├── Infinity16.png
├── Infinity16.svg
├── Jumbler.png
├── Jumbler.svg
├── Jumbler16.png
├── Jumbler16.svg
├── Menu.png
├── Menu.svg
├── Noise.png
├── Noise.svg
├── Noise16.png
├── Noise16.svg
├── None_bg.png
├── None_bg.svg
├── Nr1.png
├── Nr1.svg
├── Nr10.png
├── Nr10.svg
├── Nr11.png
├── Nr11.svg
├── Nr12.png
├── Nr12.svg
├── Nr2.png
├── Nr2.svg
├── Nr3.png
├── Nr3.svg
├── Nr4.png
├── Nr4.svg
├── Nr5.png
├── Nr5.svg
├── Nr6.png
├── Nr6.svg
├── Nr7.png
├── Nr7.svg
├── Nr8.png
├── Nr8.svg
├── Nr9.png
├── Nr9.svg
├── Oops.png
├── Oops.svg
├── Oops.wav
├── Oops16.png
├── Oops16.svg
├── Oops_bg.png
├── Oops_bg.svg
├── Phaser.png
├── Phaser.svg
├── Phaser16.png
├── Phaser16.svg
├── Pitch.png
├── Pitch.svg
├── Pitch16.png
├── Pitch16.svg
├── Reverb.png
├── Reverb.svg
├── Reverb16.png
├── Reverb16.svg
├── Reverser.png
├── Reverser.svg
├── Reverser16.png
├── Reverser16.svg
├── Ringmod.png
├── Ringmod.svg
├── Ringmod16.png
├── Ringmod16.svg
├── Scratch.png
├── Scratch.svg
├── Scratch16.png
├── Scratch16.svg
├── Stutter.png
├── Stutter.svg
├── Stutter16.png
├── Stutter16.svg
├── Surprise.png
├── Surprise.svg
├── Surprise16.png
├── Surprise16.svg
├── Surprise_bg.png
├── Surprise_bg.svg
├── Tape_bg.png
├── Tape_bg.svg
├── Tape_bg2.svg
├── Tape_speed.png
├── Tape_speed.svg
├── Tape_speed16.png
├── Tape_speed16.svg
├── Tape_start.png
├── Tape_start.svg
├── Tape_start16.png
├── Tape_start16.svg
├── Tape_stop.png
├── Tape_stop.svg
├── Tape_stop16.png
├── Tape_stop16.svg
├── TeslaCoil.png
├── TeslaCoil.svg
├── TeslaCoil16.png
├── TeslaCoil16.svg
├── TeslaCoil_bg.png
├── TeslaCoil_bg.svg
├── Tremolo.png
├── Tremolo.svg
├── Tremolo16.png
├── Tremolo16.svg
├── Vinyl_bg.png
├── Vinyl_bg.svg
├── Wah.png
├── Wah.svg
├── Wah16.png
├── Wah16.svg
├── Waveshaper.png
├── Waveshaper.svg
├── Waveshaper16.png
├── Waveshaper16.svg
├── Width.png
├── Width.svg
├── Width16.png
├── Width16.svg
├── Wow_and_flutter.png
├── Wow_and_flutter.svg
├── Wow_and_flutter16.png
├── Wow_and_flutter16.svg
├── page1.png
├── page1.svg
├── page10.png
├── page10.svg
├── page11.png
├── page11.svg
├── page12.png
├── page12.svg
├── page13.png
├── page13.svg
├── page14.png
├── page14.svg
├── page15.png
├── page15.svg
├── page16.png
├── page16.svg
├── page2.png
├── page2.svg
├── page3.png
├── page3.svg
├── page4.png
├── page4.svg
├── page5.png
├── page5.svg
├── page6.png
├── page6.svg
├── page7.png
├── page7.svg
├── page8.png
├── page8.svg
├── page9.png
├── page9.svg
├── shape_tb.png
├── shape_tb.svg
├── shape_v_tb.png
├── shape_v_tb.svg
├── surface.png
└── surface2.svg
├── makefile
├── manifest.ttl
└── src
├── ACE
├── ACEReverb.hpp
├── COPYING
└── LICENSE
├── Airwindows
├── Galactic.cpp
├── Galactic.hpp
├── Infinity2.cpp
├── Infinity2.hpp
├── LICENSE
├── XRegion.cpp
└── XRegion.hpp
├── AllPassFilter.hpp
├── BOops.cpp
├── BOops.hpp
├── BOopsGUI.cpp
├── BOopsGUI.hpp
├── BUtilities
├── Any.hpp
├── Path.hpp
├── Point.hpp
├── RectArea.hpp
├── mix.hpp
├── stof.cpp
├── stof.hpp
├── to_string.cpp
├── to_string.hpp
├── vsystem.cpp
└── vsystem.hpp
├── BWidgets
├── BColors.cpp
├── BColors.hpp
├── BDevices.hpp
├── BEvents.hpp
├── BItems.cpp
├── BItems.hpp
├── BStyles.cpp
├── BStyles.hpp
├── BWidgets.hpp
├── Button.cpp
├── Button.hpp
├── ChoiceBox.cpp
├── ChoiceBox.hpp
├── Dial.cpp
├── Dial.hpp
├── DialValue.cpp
├── DialValue.hpp
├── Display.cpp
├── Display.hpp
├── DownButton.cpp
├── DownButton.hpp
├── DrawingSurface.cpp
├── DrawingSurface.hpp
├── FileChooser.cpp
├── FileChooser.hpp
├── Focusable.hpp
├── HPianoRoll.cpp
├── HPianoRoll.hpp
├── HScale.cpp
├── HScale.hpp
├── HSlider.cpp
├── HSlider.hpp
├── HSliderValue.cpp
├── HSliderValue.hpp
├── HSwitch.cpp
├── HSwitch.hpp
├── Icon.cpp
├── Icon.hpp
├── ImageIcon.cpp
├── ImageIcon.hpp
├── ItemBox.cpp
├── ItemBox.hpp
├── Knob.cpp
├── Knob.hpp
├── Label.cpp
├── Label.hpp
├── LeftButton.cpp
├── LeftButton.hpp
├── ListBox.cpp
├── ListBox.hpp
├── MessageBox.cpp
├── MessageBox.hpp
├── MinusButton.cpp
├── MinusButton.hpp
├── PianoWidget.cpp
├── PianoWidget.hpp
├── PlusButton.cpp
├── PlusButton.hpp
├── PopupListBox.cpp
├── PopupListBox.hpp
├── RangeWidget.cpp
├── RangeWidget.hpp
├── RightButton.cpp
├── RightButton.hpp
├── StateDisplay.cpp
├── StateDisplay.hpp
├── Text.cpp
├── Text.hpp
├── TextButton.cpp
├── TextButton.hpp
├── TextToggleButton.cpp
├── TextToggleButton.hpp
├── ToggleButton.cpp
├── ToggleButton.hpp
├── UpButton.cpp
├── UpButton.hpp
├── VScale.cpp
├── VScale.hpp
├── VSlider.cpp
├── VSlider.hpp
├── VSliderValue.cpp
├── VSliderValue.hpp
├── VSwitch.cpp
├── VSwitch.hpp
├── ValueWidget.cpp
├── ValueWidget.hpp
├── Widget.cpp
├── Widget.hpp
├── Window.cpp
├── Window.hpp
├── cairoplus.c
├── cairoplus.h
├── pugl
│ ├── .clang-tidy
│ ├── AUTHORS
│ ├── COPYING
│ ├── README.md
│ ├── implementation.c
│ ├── implementation.h
│ ├── mac.h
│ ├── mac.m
│ ├── mac_cairo.m
│ ├── mac_gl.m
│ ├── mac_stub.m
│ ├── mac_vulkan.m
│ ├── pugl
│ │ ├── cairo.h
│ │ ├── gl.h
│ │ ├── pugl.h
│ │ ├── stub.h
│ │ └── vulkan.h
│ ├── stub.h
│ ├── types.h
│ ├── win.c
│ ├── win.h
│ ├── win_cairo.c
│ ├── win_gl.c
│ ├── win_stub.c
│ ├── win_vulkan.c
│ ├── x11.c
│ ├── x11.h
│ ├── x11_cairo.c
│ ├── x11_gl.c
│ ├── x11_stub.c
│ └── x11_vulkan.c
└── pugl_cairo_test.c
├── Biquad.hpp
├── BiquadPeakFilter.hpp
├── ButterworthBandPassFilter.hpp
├── ButterworthFilter.hpp
├── ButterworthHighPassFilter.hpp
├── ButterworthLowPassFilter.hpp
├── Checkbox.hpp
├── ControllerLimits.hpp
├── Crackle.hpp
├── CurveChart.hpp
├── Definitions.hpp
├── Dial.hpp
├── DialRange.hpp
├── DownClick.cpp
├── DownClick.hpp
├── Fx.hpp
├── FxAmp.hpp
├── FxBalance.hpp
├── FxBanger.hpp
├── FxBitcrush.hpp
├── FxChopper.hpp
├── FxCrackles.hpp
├── FxDecimate.hpp
├── FxDefaults.hpp
├── FxDelay.hpp
├── FxDistortion.hpp
├── FxEQ.hpp
├── FxFilter.hpp
├── FxFlanger.hpp
├── FxGalactic.hpp
├── FxInfinity.hpp
├── FxJumbler.hpp
├── FxNoise.hpp
├── FxOops.hpp
├── FxPhaser.hpp
├── FxReverb.hpp
├── FxReverser.hpp
├── FxRingModulator.hpp
├── FxScratch.hpp
├── FxStutter.hpp
├── FxSurprise.hpp
├── FxTapeSpeed.hpp
├── FxTapeStop.hpp
├── FxTeslaCoil.hpp
├── FxTremolo.hpp
├── FxWah.hpp
├── FxWaveshaper.hpp
├── FxWidth.hpp
├── FxWowFlutter.hpp
├── HLine.hpp
├── HRangeScrollbar.hpp
├── HSlider.hpp
├── HaloButton.hpp
├── HaloToggleButton.hpp
├── IconPadButton.hpp
├── Journal.hpp
├── Keys.hpp
├── Limit.hpp
├── LoadButton.hpp
├── Locale_DE.hpp
├── Locale_EN.hpp
├── Message.cpp
├── Message.hpp
├── MessageDefinitions.hpp
├── MidiDefs.hpp
├── MidiKey.hpp
├── MidiToggleButton.hpp
├── MonitorWidget.hpp
├── Node.hpp
├── OptionAmp.hpp
├── OptionBalance.hpp
├── OptionBanger.hpp
├── OptionBitcrush.hpp
├── OptionChopper.hpp
├── OptionCrackles.hpp
├── OptionDecimate.hpp
├── OptionDelay.hpp
├── OptionDistortion.hpp
├── OptionEQ.hpp
├── OptionFilter.hpp
├── OptionFlanger.hpp
├── OptionGalactic.hpp
├── OptionInfinity.hpp
├── OptionNoise.hpp
├── OptionOops.hpp
├── OptionPhaser.hpp
├── OptionReverb.hpp
├── OptionRingModulator.hpp
├── OptionScratch.hpp
├── OptionStutter.hpp
├── OptionSurprise.hpp
├── OptionTapeSpeed.hpp
├── OptionTapeStop.hpp
├── OptionTeslaCoil.hpp
├── OptionTremolo.hpp
├── OptionWah.hpp
├── OptionWaveshaper.hpp
├── OptionWidget.hpp
├── OptionWidth.hpp
├── OptionWowFlutter.hpp
├── Pad.hpp
├── PadButton.hpp
├── PadMessage.hpp
├── PadSurface.hpp
├── PadToggleButton.hpp
├── Pattern.cpp
├── Pattern.hpp
├── PatternChooser.cpp
├── PatternChooser.hpp
├── Ports.hpp
├── Range.hpp
├── RingBuffer.hpp
├── Sample.hpp
├── SampleChooser.cpp
├── SampleChooser.hpp
├── SelectWidget.cpp
├── SelectWidget.hpp
├── Selection.hpp
├── Shape.hpp
├── ShapeWidget.cpp
├── ShapeWidget.hpp
├── Slot.cpp
├── Slot.hpp
├── Snapshots.hpp
├── StaticArrayList.hpp
├── Stereo.hpp
├── SymbolWidget.hpp
├── UpClick.cpp
├── UpClick.hpp
├── Urids.hpp
├── VLine.hpp
├── VSlider.hpp
├── ValueSelect.cpp
├── ValueSelect.hpp
├── WaveformSelect.hpp
├── bool2hstr.hpp
├── drawSymbol.hpp
├── drawbutton.hpp
├── getURIs.hpp
├── minimp3.h
├── minimp3_ex.h
├── screen.c
├── screen.h
└── to_shapes.hpp
/.gitignore:
--------------------------------------------------------------------------------
1 | /BOops.lv2/**
2 | .tags
3 | /.vscode/**
4 |
--------------------------------------------------------------------------------
/doc/keys_mode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/doc/keys_mode.png
--------------------------------------------------------------------------------
/doc/midi_control_pattern.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/doc/midi_control_pattern.png
--------------------------------------------------------------------------------
/doc/midi_controlled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/doc/midi_controlled.png
--------------------------------------------------------------------------------
/doc/pattern.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/doc/pattern.png
--------------------------------------------------------------------------------
/doc/pattern_mode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/doc/pattern_mode.png
--------------------------------------------------------------------------------
/doc/pattern_tabs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/doc/pattern_tabs.png
--------------------------------------------------------------------------------
/doc/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/doc/screenshot.png
--------------------------------------------------------------------------------
/doc/shape_mode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/doc/shape_mode.png
--------------------------------------------------------------------------------
/doc/slots.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/doc/slots.png
--------------------------------------------------------------------------------
/inc/Amp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Amp.png
--------------------------------------------------------------------------------
/inc/Amp.svg:
--------------------------------------------------------------------------------
1 |
2 |
78 |
--------------------------------------------------------------------------------
/inc/Amp16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Amp16.png
--------------------------------------------------------------------------------
/inc/Amp16.svg:
--------------------------------------------------------------------------------
1 |
2 |
78 |
--------------------------------------------------------------------------------
/inc/Amp_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Amp_bg.png
--------------------------------------------------------------------------------
/inc/Balance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Balance.png
--------------------------------------------------------------------------------
/inc/Balance16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Balance16.png
--------------------------------------------------------------------------------
/inc/Banger.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Banger.png
--------------------------------------------------------------------------------
/inc/Banger16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Banger16.png
--------------------------------------------------------------------------------
/inc/Bitcrush.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Bitcrush.png
--------------------------------------------------------------------------------
/inc/Bitcrush16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Bitcrush16.png
--------------------------------------------------------------------------------
/inc/Chop_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Chop_bg.png
--------------------------------------------------------------------------------
/inc/Chopper.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Chopper.png
--------------------------------------------------------------------------------
/inc/Chopper16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Chopper16.png
--------------------------------------------------------------------------------
/inc/Crackles.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Crackles.png
--------------------------------------------------------------------------------
/inc/Crackles16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Crackles16.png
--------------------------------------------------------------------------------
/inc/Decimate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Decimate.png
--------------------------------------------------------------------------------
/inc/Decimate16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Decimate16.png
--------------------------------------------------------------------------------
/inc/Delay.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Delay.png
--------------------------------------------------------------------------------
/inc/Delay16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Delay16.png
--------------------------------------------------------------------------------
/inc/Delay_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Delay_bg.png
--------------------------------------------------------------------------------
/inc/Distortion.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Distortion.png
--------------------------------------------------------------------------------
/inc/Distortion16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Distortion16.png
--------------------------------------------------------------------------------
/inc/Distortion_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Distortion_bg.png
--------------------------------------------------------------------------------
/inc/EQ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/EQ.png
--------------------------------------------------------------------------------
/inc/EQ.svg:
--------------------------------------------------------------------------------
1 |
2 |
78 |
--------------------------------------------------------------------------------
/inc/EQ16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/EQ16.png
--------------------------------------------------------------------------------
/inc/Filter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Filter.png
--------------------------------------------------------------------------------
/inc/Filter16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Filter16.png
--------------------------------------------------------------------------------
/inc/Flanger.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Flanger.png
--------------------------------------------------------------------------------
/inc/Flanger16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Flanger16.png
--------------------------------------------------------------------------------
/inc/Flanger_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Flanger_bg.png
--------------------------------------------------------------------------------
/inc/Galactic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Galactic.png
--------------------------------------------------------------------------------
/inc/Galactic16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Galactic16.png
--------------------------------------------------------------------------------
/inc/Infinity.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Infinity.png
--------------------------------------------------------------------------------
/inc/Infinity16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Infinity16.png
--------------------------------------------------------------------------------
/inc/Jumbler.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Jumbler.png
--------------------------------------------------------------------------------
/inc/Jumbler16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Jumbler16.png
--------------------------------------------------------------------------------
/inc/Menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Menu.png
--------------------------------------------------------------------------------
/inc/Noise.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Noise.png
--------------------------------------------------------------------------------
/inc/Noise16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Noise16.png
--------------------------------------------------------------------------------
/inc/None_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/None_bg.png
--------------------------------------------------------------------------------
/inc/Nr1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Nr1.png
--------------------------------------------------------------------------------
/inc/Nr1.svg:
--------------------------------------------------------------------------------
1 |
2 |
78 |
--------------------------------------------------------------------------------
/inc/Nr10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Nr10.png
--------------------------------------------------------------------------------
/inc/Nr11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Nr11.png
--------------------------------------------------------------------------------
/inc/Nr11.svg:
--------------------------------------------------------------------------------
1 |
2 |
78 |
--------------------------------------------------------------------------------
/inc/Nr12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Nr12.png
--------------------------------------------------------------------------------
/inc/Nr2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Nr2.png
--------------------------------------------------------------------------------
/inc/Nr2.svg:
--------------------------------------------------------------------------------
1 |
2 |
78 |
--------------------------------------------------------------------------------
/inc/Nr3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Nr3.png
--------------------------------------------------------------------------------
/inc/Nr3.svg:
--------------------------------------------------------------------------------
1 |
2 |
78 |
--------------------------------------------------------------------------------
/inc/Nr4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Nr4.png
--------------------------------------------------------------------------------
/inc/Nr4.svg:
--------------------------------------------------------------------------------
1 |
2 |
78 |
--------------------------------------------------------------------------------
/inc/Nr5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Nr5.png
--------------------------------------------------------------------------------
/inc/Nr5.svg:
--------------------------------------------------------------------------------
1 |
2 |
78 |
--------------------------------------------------------------------------------
/inc/Nr6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Nr6.png
--------------------------------------------------------------------------------
/inc/Nr6.svg:
--------------------------------------------------------------------------------
1 |
2 |
78 |
--------------------------------------------------------------------------------
/inc/Nr7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Nr7.png
--------------------------------------------------------------------------------
/inc/Nr7.svg:
--------------------------------------------------------------------------------
1 |
2 |
78 |
--------------------------------------------------------------------------------
/inc/Nr8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Nr8.png
--------------------------------------------------------------------------------
/inc/Nr8.svg:
--------------------------------------------------------------------------------
1 |
2 |
78 |
--------------------------------------------------------------------------------
/inc/Nr9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Nr9.png
--------------------------------------------------------------------------------
/inc/Nr9.svg:
--------------------------------------------------------------------------------
1 |
2 |
78 |
--------------------------------------------------------------------------------
/inc/Oops.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Oops.png
--------------------------------------------------------------------------------
/inc/Oops.svg:
--------------------------------------------------------------------------------
1 |
2 |
78 |
--------------------------------------------------------------------------------
/inc/Oops.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Oops.wav
--------------------------------------------------------------------------------
/inc/Oops16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Oops16.png
--------------------------------------------------------------------------------
/inc/Oops_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Oops_bg.png
--------------------------------------------------------------------------------
/inc/Phaser.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Phaser.png
--------------------------------------------------------------------------------
/inc/Phaser16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Phaser16.png
--------------------------------------------------------------------------------
/inc/Pitch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Pitch.png
--------------------------------------------------------------------------------
/inc/Pitch16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Pitch16.png
--------------------------------------------------------------------------------
/inc/Reverb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Reverb.png
--------------------------------------------------------------------------------
/inc/Reverb16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Reverb16.png
--------------------------------------------------------------------------------
/inc/Reverser.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Reverser.png
--------------------------------------------------------------------------------
/inc/Reverser16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Reverser16.png
--------------------------------------------------------------------------------
/inc/Ringmod.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Ringmod.png
--------------------------------------------------------------------------------
/inc/Ringmod16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Ringmod16.png
--------------------------------------------------------------------------------
/inc/Scratch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Scratch.png
--------------------------------------------------------------------------------
/inc/Scratch16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Scratch16.png
--------------------------------------------------------------------------------
/inc/Stutter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Stutter.png
--------------------------------------------------------------------------------
/inc/Stutter16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Stutter16.png
--------------------------------------------------------------------------------
/inc/Surprise.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Surprise.png
--------------------------------------------------------------------------------
/inc/Surprise16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Surprise16.png
--------------------------------------------------------------------------------
/inc/Surprise_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Surprise_bg.png
--------------------------------------------------------------------------------
/inc/Tape_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Tape_bg.png
--------------------------------------------------------------------------------
/inc/Tape_speed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Tape_speed.png
--------------------------------------------------------------------------------
/inc/Tape_speed16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Tape_speed16.png
--------------------------------------------------------------------------------
/inc/Tape_start.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Tape_start.png
--------------------------------------------------------------------------------
/inc/Tape_start16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Tape_start16.png
--------------------------------------------------------------------------------
/inc/Tape_stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Tape_stop.png
--------------------------------------------------------------------------------
/inc/Tape_stop16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Tape_stop16.png
--------------------------------------------------------------------------------
/inc/TeslaCoil.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/TeslaCoil.png
--------------------------------------------------------------------------------
/inc/TeslaCoil16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/TeslaCoil16.png
--------------------------------------------------------------------------------
/inc/TeslaCoil_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/TeslaCoil_bg.png
--------------------------------------------------------------------------------
/inc/Tremolo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Tremolo.png
--------------------------------------------------------------------------------
/inc/Tremolo16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Tremolo16.png
--------------------------------------------------------------------------------
/inc/Vinyl_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Vinyl_bg.png
--------------------------------------------------------------------------------
/inc/Wah.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Wah.png
--------------------------------------------------------------------------------
/inc/Wah.svg:
--------------------------------------------------------------------------------
1 |
2 |
78 |
--------------------------------------------------------------------------------
/inc/Wah16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Wah16.png
--------------------------------------------------------------------------------
/inc/Waveshaper.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Waveshaper.png
--------------------------------------------------------------------------------
/inc/Waveshaper16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Waveshaper16.png
--------------------------------------------------------------------------------
/inc/Width.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Width.png
--------------------------------------------------------------------------------
/inc/Width16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Width16.png
--------------------------------------------------------------------------------
/inc/Wow_and_flutter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Wow_and_flutter.png
--------------------------------------------------------------------------------
/inc/Wow_and_flutter16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/Wow_and_flutter16.png
--------------------------------------------------------------------------------
/inc/page1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/page1.png
--------------------------------------------------------------------------------
/inc/page10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/page10.png
--------------------------------------------------------------------------------
/inc/page11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/page11.png
--------------------------------------------------------------------------------
/inc/page12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/page12.png
--------------------------------------------------------------------------------
/inc/page13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/page13.png
--------------------------------------------------------------------------------
/inc/page14.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/page14.png
--------------------------------------------------------------------------------
/inc/page15.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/page15.png
--------------------------------------------------------------------------------
/inc/page16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/page16.png
--------------------------------------------------------------------------------
/inc/page2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/page2.png
--------------------------------------------------------------------------------
/inc/page3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/page3.png
--------------------------------------------------------------------------------
/inc/page4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/page4.png
--------------------------------------------------------------------------------
/inc/page5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/page5.png
--------------------------------------------------------------------------------
/inc/page6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/page6.png
--------------------------------------------------------------------------------
/inc/page7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/page7.png
--------------------------------------------------------------------------------
/inc/page8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/page8.png
--------------------------------------------------------------------------------
/inc/page9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/page9.png
--------------------------------------------------------------------------------
/inc/shape_tb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/shape_tb.png
--------------------------------------------------------------------------------
/inc/shape_v_tb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/shape_v_tb.png
--------------------------------------------------------------------------------
/inc/surface.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjaehn/BOops/49ce8dbef86e685b7b792f8b31c8e1aca458c3e4/inc/surface.png
--------------------------------------------------------------------------------
/manifest.ttl:
--------------------------------------------------------------------------------
1 | @prefix lv2: .
2 | @prefix rdfs: .
3 | @prefix ui: .
4 |
5 |
6 | a lv2:Plugin ;
7 | lv2:binary ;
8 | rdfs:seeAlso .
9 |
10 |
11 | a ui:X11UI;
12 | ui:binary ;
13 | rdfs:seeAlso .
14 |
--------------------------------------------------------------------------------
/src/Airwindows/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Chris Johnson
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/src/Airwindows/XRegion.hpp:
--------------------------------------------------------------------------------
1 | /* ========================================
2 | * XRegion - XRegion.h
3 | * Created 8/12/11 by SPIAdmin
4 | * Copyright (c) 2011 __MyCompanyName__, All rights reserved
5 | * ======================================== */
6 |
7 | /* MIT License
8 |
9 | Copyright (c) 2018 Chris Johnson
10 | Copyright (C) 2021 Sven Jähnichen
11 |
12 | Permission is hereby granted, free of charge, to any person obtaining a copy
13 | of this software and associated documentation files (the "Software"), to deal
14 | in the Software without restriction, including without limitation the rights
15 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16 | copies of the Software, and to permit persons to whom the Software is
17 | furnished to do so, subject to the following conditions:
18 |
19 | The above copyright notice and this permission notice shall be included in all
20 | copies or substantial portions of the Software.
21 |
22 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28 | SOFTWARE.
29 | */
30 |
31 | #ifndef XREGION_HPP_
32 | #define XREGION_HPP_
33 |
34 | #include
35 | #include
36 |
37 |
38 | class XRegion
39 | {
40 | public:
41 | XRegion (const double rate);
42 | XRegion (const XRegion& that) = delete;
43 | ~XRegion();
44 | XRegion& operator= (const XRegion& that) = delete;
45 |
46 | void process (float* input1, float* input2, float* output1, float* output2, int32_t sampleFrames);
47 | float* getParameters ();
48 | void setParameters (const float* values);
49 |
50 | private:
51 | double rate;
52 | float biquad[15];
53 | float biquadA[15];
54 | float biquadB[15];
55 | float biquadC[15];
56 | float biquadD[15];
57 | uint32_t fpdL;
58 | uint32_t fpdR;
59 | float params[6];
60 | };
61 |
62 | #endif /* XREGION_HPP_ */
63 |
--------------------------------------------------------------------------------
/src/AllPassFilter.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2020 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef ALLPASSFILTER_HPP_
22 | #define ALLPASSFILTER_HPP_
23 |
24 | class AllPassFilter
25 | {
26 | public:
27 | AllPassFilter() : AllPassFilter (0) {}
28 |
29 | AllPassFilter (const float delay) : f (0), m (0) {setDelay (delay);}
30 |
31 | void setDelay (const float delay) {f = (1 - delay) / (1 + delay);}
32 |
33 | float process (const float input)
34 | {
35 | const float r = m - input * f;
36 | m = input + r * f;
37 | return r;
38 | }
39 |
40 | protected:
41 | float f;
42 | float m;
43 | };
44 |
45 | #endif /* ALLPASSFILTER_HPP_ */
46 |
--------------------------------------------------------------------------------
/src/BUtilities/Point.hpp:
--------------------------------------------------------------------------------
1 | /* Point.hpp
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2019 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef BUTILITIES_POINT_HPP_
22 | #define BUTILITIES_POINT_HPP_
23 |
24 | namespace BUtilities
25 | {
26 |
27 | struct Point
28 | {
29 | double x, y;
30 |
31 | Point () : Point (0, 0) {}
32 | Point (double x, double y) : x (x), y (y) {}
33 |
34 | Point& operator+= (const Point& rhs)
35 | {
36 | this->x += rhs.x;
37 | this->y += rhs.y;
38 | return *this;
39 | }
40 |
41 | Point& operator-= (const Point& rhs)
42 | {
43 | this->x -= rhs.x;
44 | this->y -= rhs.y;
45 | return *this;
46 | }
47 |
48 | friend bool operator== (const Point& lhs, const Point& rhs) {return ((lhs.x == rhs.x) && (lhs.y == rhs.y));}
49 | friend bool operator!= (const Point& lhs, const Point& rhs) {return !(lhs == rhs);}
50 | friend Point operator+ (Point lhs, const Point& rhs) {return (lhs += rhs);}
51 | friend Point operator- (Point lhs, const Point& rhs) {return (lhs -= rhs);}
52 |
53 | };
54 |
55 | }
56 |
57 | #endif /* BUTILITIES_POINT_HPP_ */
58 |
--------------------------------------------------------------------------------
/src/BUtilities/mix.hpp:
--------------------------------------------------------------------------------
1 | /* mix.hpp
2 | * Copyright (C) 2020 Sven Jähnichen
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef BUTILITIES_MIX_HPP_
19 | #define BUTILITIES_MIX_HPP_
20 |
21 | namespace BUtilities {
22 |
23 | template inline T mix (const T& t0, const T& t1, const double ratio)
24 | {
25 | return t1 * ratio + t0 * (1.0f - ratio);
26 | }
27 |
28 | }
29 |
30 | #endif /* BUTILITIES_MIX_HPP_ */
31 |
--------------------------------------------------------------------------------
/src/BUtilities/stof.cpp:
--------------------------------------------------------------------------------
1 | /* stof.cpp
2 | * Copyright (C) 2020 Sven Jähnichen
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #include "stof.hpp"
19 | #include
20 |
21 | namespace BUtilities {
22 |
23 | float stof (const std::string& str, size_t* idx)
24 | {
25 | const std::string numbers = "0123456789";
26 | bool isNumber = false;
27 | float sign = 1.0f;
28 | float predec = 0.0f;
29 | float dec = 0.0f;
30 | float decfac = 0.1f;
31 | size_t i = 0;
32 |
33 | // Ignore spaces before
34 | while (str[i] == ' ') ++i;
35 |
36 | // Check sign
37 | if ((str[i] == '+') || (str[i] == '-'))
38 | {
39 | if (str[i] == '-') sign = -1.0f;
40 | ++i;
41 | }
42 |
43 | // Interpret pre-decimal digits
44 | while ((str[i] != 0) && (numbers.find_first_of (str[i]) != std::string::npos))
45 | {
46 | predec = predec * 10.0f + str[i] - '0';
47 | ++i;
48 | isNumber = true;
49 | }
50 |
51 | // Check decimal sign
52 | if ((str[i] == '.') || (str[i] == ','))
53 | {
54 | ++i;
55 |
56 | // Interpret decimal digits
57 | while ((str[i] != 0) && (numbers.find_first_of (str[i]) != std::string::npos))
58 | {
59 | dec += (str[i] - '0') * decfac;
60 | decfac *= 0.1f;
61 | ++i;
62 | isNumber = true;
63 | }
64 | }
65 |
66 | // Communicate next position
67 | if (idx != nullptr) *idx = i;
68 |
69 | // Not a number: invalid argument exception
70 | if (!isNumber) throw std::invalid_argument (str + " is not a number");
71 |
72 | return sign * (predec + dec);
73 | }
74 |
75 | }
76 |
--------------------------------------------------------------------------------
/src/BUtilities/stof.hpp:
--------------------------------------------------------------------------------
1 | /* stof.hpp
2 | * Copyright (C) 2020 Sven Jähnichen
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef BUTILITIES_STOF_HPP_
19 | #define BUTILITIES_STOF_HPP_
20 |
21 | #include
22 | #include
23 |
24 | namespace BUtilities {
25 |
26 | float stof (const std::string& str, size_t* idx = 0);
27 |
28 | }
29 |
30 | #endif /* BUTILITIES_STOF_HPP_ */
31 |
--------------------------------------------------------------------------------
/src/BUtilities/to_string.cpp:
--------------------------------------------------------------------------------
1 | /* to_string.cpp
2 | * Copyright (C) 2019 Sven Jähnichen
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #include "to_string.hpp"
19 | #include
20 |
21 | namespace BUtilities {
22 |
23 | std::string to_string (const double value)
24 | {
25 | std::ostringstream os;
26 | os << value;
27 | std::string str = os.str();
28 | return str;
29 | }
30 |
31 | std::string to_string (const double value, const std::string& format)
32 | {
33 | char c[64];
34 | snprintf (c, 64, format.c_str (), value);
35 | std::string str = c;
36 | return c;
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/src/BUtilities/to_string.hpp:
--------------------------------------------------------------------------------
1 | /* to_string.hpp
2 | * Copyright (C) 2019 Sven Jähnichen
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef BUTILITIES_TO_STRING_HPP_
19 | #define BUTILITIES_TO_STRING_HPP_
20 |
21 | #include
22 |
23 | namespace BUtilities {
24 |
25 | std::string to_string (const double value);
26 | std::string to_string (const double value, const std::string& format);
27 |
28 | }
29 |
30 | #endif /* BUTILITIES_TO_STRING_HPP_ */
31 |
--------------------------------------------------------------------------------
/src/BUtilities/vsystem.cpp:
--------------------------------------------------------------------------------
1 | /* vsystem.cpp
2 | * Copyright (C) 2021 Sven Jähnichen
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #include "vsystem.hpp"
19 | #include
20 | #include
21 |
22 | namespace BUtilities
23 | {
24 |
25 | [[noreturn]] static void vexec (char* argv[])
26 | {
27 | execvp (argv[0], argv);
28 | perror ("execvp");
29 | _exit (1);
30 | }
31 |
32 | int vsystem (char* argv[])
33 | {
34 | pid_t pid = vfork();
35 | if (pid != 0) return pid;
36 | vexec (argv);
37 | return 0;
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/src/BUtilities/vsystem.hpp:
--------------------------------------------------------------------------------
1 | /* vsystem.hpp
2 | * Copyright (C) 2021 Sven Jähnichen
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef BUTILITIES_VSYSTEM_HPP_
19 | #define BUTILITIES_VSYSTEM_HPP_
20 |
21 | namespace BUtilities
22 | {
23 |
24 | int vsystem (char* argv[]);
25 |
26 | }
27 |
28 | #endif /* BUTILITIES_VSYSTEM_HPP_ */
29 |
--------------------------------------------------------------------------------
/src/BWidgets/BWidgets.hpp:
--------------------------------------------------------------------------------
1 | /* BWidgets.hpp
2 | * Copyright (C) 2018, 2019 Sven Jähnichen
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef BWIDGETS_HPP_
19 | #define BWIDGETS_HPP_
20 |
21 | #include "Window.hpp"
22 | #include "Display.hpp"
23 | #include "StateDisplay.hpp"
24 | #include "Label.hpp"
25 | #include "Text.hpp"
26 | #include "Knob.hpp"
27 | #include "ValueWidget.hpp"
28 | #include "RangeWidget.hpp"
29 | #include "HScale.hpp"
30 | #include "HSlider.hpp"
31 | #include "VScale.hpp"
32 | #include "VSlider.hpp"
33 | #include "Dial.hpp"
34 | #include "DialValue.hpp"
35 | #include "HSliderValue.hpp"
36 | #include "VSliderValue.hpp"
37 | #include "Button.hpp"
38 | #include "ToggleButton.hpp"
39 | #include "TextButton.hpp"
40 | #include "TextToggleButton.hpp"
41 | #include "UpButton.hpp"
42 | #include "DownButton.hpp"
43 | #include "LeftButton.hpp"
44 | #include "RightButton.hpp"
45 | #include "PlusButton.hpp"
46 | #include "MinusButton.hpp"
47 | #include "HSwitch.hpp"
48 | #include "VSwitch.hpp"
49 | #include "DrawingSurface.hpp"
50 | #include "MessageBox.hpp"
51 | #include "ChoiceBox.hpp"
52 | #include "ListBox.hpp"
53 | #include "ItemBox.hpp"
54 | #include "PopupListBox.hpp"
55 | #include "PianoWidget.hpp"
56 | #include "HPianoRoll.hpp"
57 | #include "Icon.hpp"
58 | #include "ImageIcon.hpp"
59 | #include "FileChooser.hpp"
60 |
61 | #endif /*BWIDGETS_HPP_*/
62 |
--------------------------------------------------------------------------------
/src/BWidgets/Display.cpp:
--------------------------------------------------------------------------------
1 | /* Display.cpp
2 | * Copyright (C) 2019 Sven Jähnichen
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #include "Display.hpp"
19 |
20 | namespace BWidgets
21 | {
22 | Display::Display () : Display (0.0, 0.0, 0.0, 0.0, "display") {}
23 |
24 | Display::Display (const double x, const double y, const double width,
25 | const double height, const std::string& text) :
26 | Widget (x, y, width, height, text)
27 | {
28 |
29 | }
30 |
31 | Widget* Display::clone () const {return new Display (*this);}
32 |
33 | bool Display::filter (Widget* widget) {return true;}
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/src/BWidgets/Display.hpp:
--------------------------------------------------------------------------------
1 | /* Display.hpp
2 | * Copyright (C) 2019 Sven Jähnichen
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef BWIDGETS_DISPLAY_HPP_
19 | #define BWIDGETS_DISPLAY_HPP_
20 |
21 | #include "Widget.hpp"
22 |
23 | namespace BWidgets
24 | {
25 |
26 | /**
27 | * Class BWidgets::Display
28 | *
29 | * Container widget. Children of this widget will only be displayed (and handled
30 | * by the event handler) if the passWidget method returns true (default). This
31 | * class allows filtering of child widgets.
32 | */
33 | class Display : public Widget
34 | {
35 | public:
36 | Display ();
37 | Display (const double x, const double y, const double width, const double height,
38 | const std::string& text);
39 |
40 | /**
41 | * Pattern cloning. Creates a new instance of the widget and copies all
42 | * its properties.
43 | */
44 | virtual Widget* clone () const override;
45 |
46 | protected:
47 | virtual bool filter (Widget* widget) override;
48 | };
49 |
50 | }
51 |
52 | #endif /* BWIDGETS_DISPLAY_HPP_ */
53 |
--------------------------------------------------------------------------------
/src/BWidgets/DownButton.hpp:
--------------------------------------------------------------------------------
1 | /* DownButton.hpp
2 | * Copyright (C) 2018, 2019 Sven Jähnichen
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef BWIDGETS_DOWNBUTTON_HPP_
19 | #define BWIDGETS_DOWNBUTTON_HPP_
20 |
21 | #include "Button.hpp"
22 | #include "Label.hpp"
23 |
24 | namespace BWidgets
25 | {
26 | /**
27 | * Class BWidgets::DownButton
28 | *
29 | * Text button widget. Is is a BWidgets::Button and thus a
30 | * BWidgets::ValueWidget having two conditions: on (value != 0) or off
31 | * (value == 0)
32 | */
33 | class DownButton : public Button
34 | {
35 | public:
36 | DownButton ();
37 | DownButton (const double x, const double y, const double width, const double height, const std::string& name, double defaultValue = 0.0);
38 |
39 | /**
40 | * Pattern cloning. Creates a new instance of the widget and copies all
41 | * its properties.
42 | */
43 | virtual Widget* clone () const override;
44 |
45 | protected:
46 | virtual void draw (const BUtilities::RectArea& area) override;
47 | };
48 |
49 | }
50 |
51 | #endif /* BWIDGETS_TOGGLEBUTTON_HPP_ */
52 |
--------------------------------------------------------------------------------
/src/BWidgets/Focusable.hpp:
--------------------------------------------------------------------------------
1 | /* Focusable.hpp
2 | * Copyright (C) 2019 Sven Jähnichen
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef BWIDGETS_FOCUSABLE_HPP_
19 | #define BWIDGETS_FOCUSABLE_HPP_
20 |
21 | #define BWIDGETS_DEFAULT_FOCUS_IN_MS 200
22 | #define BWIDGETS_DEFAULT_FOCUS_OUT_MS 5000
23 | #define BWIDGETS_DEFAULT_FOCUS_NAME "/focus"
24 |
25 | #include
26 |
27 | namespace BWidgets
28 | {
29 |
30 | class Focusable
31 | {
32 | protected:
33 | std::chrono::milliseconds focusInMs;
34 | std::chrono::milliseconds focusOutMs;
35 |
36 | public:
37 | Focusable (const std::chrono::milliseconds focusInMs, const std::chrono::milliseconds focusOutMs) :
38 | focusInMs (focusInMs), focusOutMs (focusOutMs) {}
39 |
40 | void setFocusInMilliseconds (const std::chrono::milliseconds ms) {focusInMs = ms;}
41 |
42 | std::chrono::milliseconds getFocusInMilliseconds () const {return focusInMs;}
43 |
44 | void setFocusOutMilliseconds (const std::chrono::milliseconds ms) {focusOutMs = ms;}
45 |
46 | std::chrono::milliseconds getFocusOutMilliseconds () const {return focusOutMs;}
47 |
48 | bool isFocusActive (const std::chrono::milliseconds diffMs) const {return ((diffMs >= focusInMs) && (diffMs < focusOutMs));}
49 | };
50 |
51 | }
52 |
53 | #endif /*BWIDGETS_FOCUSABLE_HPP_*/
54 |
--------------------------------------------------------------------------------
/src/BWidgets/HSwitch.cpp:
--------------------------------------------------------------------------------
1 | /* HSwitch.cpp
2 | * Copyright (C) 2018, 2019 Sven Jähnichen
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #include "HSwitch.hpp"
19 |
20 | namespace BWidgets
21 | {
22 | HSwitch::HSwitch () : HSwitch (0.0, 0.0, BWIDGETS_DEFAULT_HSWITCH_WIDTH, BWIDGETS_DEFAULT_HSWITCH_HEIGHT, "hswitch", BWIDGETS_DEFAULT_VALUE) {}
23 |
24 | HSwitch::HSwitch (const double x, const double y, const double width, const double height, const std::string& name,
25 | const double defaultvalue) :
26 | HSlider (x, y, width, height, name, defaultvalue, 0.0, 1.0, 1.0), dragged (false) {}
27 |
28 | Widget* HSwitch::clone () const {return new HSwitch (*this);}
29 |
30 | void HSwitch::onButtonPressed (BEvents::PointerEvent* event) {dragged = false;}
31 |
32 | void HSwitch::onButtonReleased (BEvents::PointerEvent* event)
33 | {
34 | if (!dragged)
35 | {
36 | if (getValue() == getMin ()) setValue (getMax ());
37 | else setValue (getMin ());
38 | }
39 | }
40 |
41 | void HSwitch::onPointerDragged (BEvents::PointerEvent* event)
42 | {
43 | dragged = true;
44 | HScale::onButtonPressed (event);
45 | }
46 |
47 | void HSwitch::updateCoords ()
48 | {
49 | double w = getEffectiveWidth ();
50 | double h = getEffectiveHeight ();
51 |
52 | knobRadius = (h < w / 2 ? h / 2 : w / 4);
53 | scaleArea = BUtilities::RectArea
54 | (
55 | getXOffset (),
56 | getYOffset () + h / 2 - knobRadius,
57 | w,
58 | 2 * knobRadius
59 | );
60 | scaleXValue = scaleArea.getX() + knobRadius + getRelativeValue () * (scaleArea.getWidth() - 2 * knobRadius);
61 | knobPosition = BUtilities::Point
62 | (
63 | scaleXValue + BWIDGETS_DEFAULT_KNOB_DEPTH,
64 | scaleArea.getY() + scaleArea.getHeight() / 2 + BWIDGETS_DEFAULT_KNOB_DEPTH
65 | );
66 | }
67 |
68 | }
69 |
--------------------------------------------------------------------------------
/src/BWidgets/HSwitch.hpp:
--------------------------------------------------------------------------------
1 | /* HSwitch.hpp
2 | * Copyright (C) 2018 Sven Jähnichen
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef BWIDGETS_HSWITCH_HPP_
19 | #define BWIDGETS_HSWITCH_HPP_
20 |
21 | #include "Knob.hpp"
22 | #include "HSlider.hpp"
23 |
24 | #define BWIDGETS_DEFAULT_HSWITCH_WIDTH 40.0
25 | #define BWIDGETS_DEFAULT_HSWITCH_HEIGHT 20.0
26 | #define BWIDGETS_DEFAULT_HSWITCH_DEPTH 1.0
27 |
28 | namespace BWidgets
29 | {
30 | /**
31 | * Class BWidgets::HSwitch
32 | *
33 | * On/OFF switch widget. Is is a BWidgets::HSlider having two conditions: on
34 | * (value != 0) or off (value == 0)
35 | */
36 | class HSwitch : public HSlider
37 | {
38 | public:
39 | HSwitch ();
40 | HSwitch (const double x, const double y, const double width, const double height, const std::string& name, const double defaultvalue);
41 |
42 | /**
43 | * Pattern cloning. Creates a new instance of the widget and copies all
44 | * its properties.
45 | */
46 | virtual Widget* clone () const override;
47 |
48 | /**
49 | * Handles the BEvents::BUTTON_PRESS_EVENT to move the slider.
50 | * @param event Pointer to a pointer event emitted by the same widget.
51 | */
52 | virtual void onButtonPressed (BEvents::PointerEvent* event) override;
53 |
54 | /**
55 | * Handles the BEvents::EventType::BUTTON_RELEASE_EVENT to move the slider.
56 | * @param event Pointer event
57 | */
58 | virtual void onButtonReleased (BEvents::PointerEvent* event) override;
59 |
60 | /**
61 | * Handles the BEvents::POINTER_DRAG_EVENT to move
62 | * the slider.
63 | * @param event Pointer to a pointer event emitted by the same widget.
64 | */
65 | virtual void onPointerDragged (BEvents::PointerEvent* event) override;
66 |
67 | protected:
68 | virtual void updateCoords () override;
69 |
70 | bool dragged;
71 | };
72 |
73 | }
74 |
75 | #endif /* BWIDGETS_HSWITCH_HPP_ */
76 |
--------------------------------------------------------------------------------
/src/BWidgets/Icon.hpp:
--------------------------------------------------------------------------------
1 | /* ImageIcon.hpp
2 | * Copyright (C) 2019 Sven Jähnichen
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef ICON_HPP_
19 | #define ICON_HPP_
20 |
21 | #include "Widget.hpp"
22 |
23 | namespace BWidgets
24 | {
25 | /**
26 | * Class BWidgets::Icon
27 | *
28 | * Widget displaying an icon.
29 | */
30 | class Icon : public Widget
31 | {
32 | public:
33 | Icon ();
34 | Icon (const double x, const double y, const double width, const double height, const std::string& name);
35 |
36 | /**
37 | * Creates a new (orphan) image icon widget and copies the widget
38 | * properties from a source image icon widget. This method doesn't
39 | * copy any parent or child widgets.
40 | * @param that Source drawing surface widget
41 | */
42 | Icon (const Icon& that);
43 |
44 | ~Icon ();
45 |
46 | /**
47 | * Assignment. Copies the widget properties from a source widget and keeps
48 | * its name and its position within the widget tree. Emits a
49 | * BEvents::ExposeEvent if the widget is visible.
50 | * @param that Source widget
51 | */
52 | Icon& operator= (const Icon& that);
53 |
54 | /**
55 | * Pattern cloning. Creates a new instance of the widget and copies all
56 | * its properties.
57 | */
58 | virtual Widget* clone () const override;
59 |
60 | cairo_surface_t* getIconSurface (BColors::State state) const;
61 |
62 | protected:
63 | virtual void draw (const BUtilities::RectArea& area) override;
64 |
65 | std::vector iconSurface;
66 | };
67 |
68 | }
69 |
70 | #endif /* ICON_HPP_ */
71 |
--------------------------------------------------------------------------------
/src/BWidgets/ImageIcon.hpp:
--------------------------------------------------------------------------------
1 | /* ImageIcon.hpp
2 | * Copyright (C) 2019 Sven Jähnichen
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef IMAGEICON_HPP_
19 | #define IMAGEICON_HPP_
20 |
21 | #include "Icon.hpp"
22 |
23 | namespace BWidgets
24 | {
25 | /**
26 | * Class BWidgets::ImageIcon
27 | *
28 | * Icon widget displaying an image file or a Cairo surface.
29 | */
30 | class ImageIcon : public Icon
31 | {
32 | public:
33 | ImageIcon ();
34 | ImageIcon (const double x, const double y, const double width, const double height, const std::string& name);
35 | ImageIcon (const double x, const double y, const double width, const double height, const std::string& name, cairo_surface_t* surface);
36 | ImageIcon (const double x, const double y, const double width, const double height, const std::string& name, const std::string& filename);
37 | ImageIcon (const double x, const double y, const double width, const double height, const std::string& name, const std::vector& surfaces);
38 | ImageIcon (const double x, const double y, const double width, const double height, const std::string& name, const std::vector& filenames);
39 |
40 | /**
41 | * Pattern cloning. Creates a new instance of the widget and copies all
42 | * its properties.
43 | */
44 | virtual Widget* clone () const override;
45 |
46 | /**
47 | * Loads an image from a Cairo surface or an image file.
48 | * @param surface Cairo surface
49 | * @param filename Filename
50 | */
51 | void loadImage (BColors::State state, cairo_surface_t* surface);
52 | void loadImage (BColors::State state, const std::string& filename);
53 | };
54 |
55 | }
56 |
57 | #endif /* IMAGEICON_HPP_ */
58 |
--------------------------------------------------------------------------------
/src/BWidgets/LeftButton.hpp:
--------------------------------------------------------------------------------
1 | /* LeftButton.hpp
2 | * Copyright (C) 2018, 2019 Sven Jähnichen
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef BWIDGETS_LEFTBUTTON_HPP_
19 | #define BWIDGETS_LEFTBUTTON_HPP_
20 |
21 | #include "Button.hpp"
22 | #include "Label.hpp"
23 |
24 | namespace BWidgets
25 | {
26 | /**
27 | * Class BWidgets::LeftButton
28 | *
29 | * Text button widget. Is is a BWidgets::Button and thus a
30 | * BWidgets::ValueWidget having two conditions: on (value != 0) or off
31 | * (value == 0)
32 | */
33 | class LeftButton : public Button
34 | {
35 | public:
36 | LeftButton ();
37 | LeftButton (const double x, const double y, const double width, const double height, const std::string& name, double defaultValue = 0.0);
38 |
39 | /**
40 | * Pattern cloning. Creates a new instance of the widget and copies all
41 | * its properties.
42 | */
43 | virtual Widget* clone () const override;
44 |
45 | protected:
46 | virtual void draw (const BUtilities::RectArea& area) override;
47 | };
48 |
49 | }
50 |
51 | #endif /* BWIDGETS_LEFTBUTTON_HPP_ */
52 |
--------------------------------------------------------------------------------
/src/BWidgets/MinusButton.hpp:
--------------------------------------------------------------------------------
1 | /* MinusButton.hpp
2 | * Copyright (C) 2018, 2019 Sven Jähnichen
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef BWIDGETS_MINUSBUTTON_HPP_
19 | #define BWIDGETS_MINUSBUTTON_HPP_
20 |
21 | #include "Button.hpp"
22 | #include "Label.hpp"
23 |
24 | namespace BWidgets
25 | {
26 | /**
27 | * Class BWidgets::MinusButton
28 | *
29 | * Text button widget. Is is a BWidgets::Button and thus a
30 | * BWidgets::ValueWidget having two conditions: on (value != 0) or off
31 | * (value == 0)
32 | */
33 | class MinusButton : public Button
34 | {
35 | public:
36 | MinusButton ();
37 | MinusButton (const double x, const double y, const double width, const double height, const std::string& name, double defaultValue = 0.0);
38 |
39 | /**
40 | * Pattern cloning. Creates a new instance of the widget and copies all
41 | * its properties.
42 | */
43 | virtual Widget* clone () const override;
44 |
45 | protected:
46 | virtual void draw (const BUtilities::RectArea& area) override;
47 | };
48 |
49 | }
50 |
51 | #endif /* BWIDGETS_MINUSBUTTON_HPP_ */
52 |
--------------------------------------------------------------------------------
/src/BWidgets/PianoWidget.cpp:
--------------------------------------------------------------------------------
1 | /* PianoWidget.cpp
2 | * Copyright (C) 2019 Sven Jähnichen
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #include "PianoWidget.hpp"
19 |
20 | namespace BWidgets
21 | {
22 |
23 | PianoWidget::PianoWidget () : PianoWidget (0, 0, 0, 0, "piano", 0, 0) {}
24 |
25 | PianoWidget::PianoWidget (const double x, const double y, const double width, const double height, const std::string& name) :
26 | PianoWidget (x, y, width, height, name, 0, 119) {}
27 |
28 | PianoWidget::PianoWidget (const double x, const double y, const double width, const double height, const std::string& name,
29 | const int startMidiKey, const int endMidiKey) :
30 | Widget (x, y, width, height, name),
31 | startMidiKey (startMidiKey), endMidiKey (endMidiKey),
32 | activeKeys (endMidiKey - startMidiKey + 1, true), pressedKeys (endMidiKey - startMidiKey + 1, false) {}
33 |
34 | Widget* PianoWidget::clone () const {return new PianoWidget (*this);}
35 |
36 | void PianoWidget::pressKeys (std::vector& keys)
37 | {
38 | if (((int) keys.size()) == endMidiKey - startMidiKey + 1) pressedKeys = keys;
39 | // TODO else throw exception
40 | update ();
41 | }
42 |
43 | std::vector PianoWidget::getPressedKeys () const {return pressedKeys;}
44 |
45 | void PianoWidget::activateKeys (std::vector& keys)
46 | {
47 | if (((int) keys.size()) == endMidiKey - startMidiKey + 1) activeKeys = keys;
48 | // TODO else throw exception
49 | update ();
50 | }
51 |
52 | std::vector PianoWidget::getActiveKeys () const {return activeKeys;}
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/src/BWidgets/PlusButton.hpp:
--------------------------------------------------------------------------------
1 | /* PlusButton.hpp
2 | * Copyright (C) 2018, 2019 Sven Jähnichen
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef BWIDGETS_PLUSBUTTON_HPP_
19 | #define BWIDGETS_PLUSBUTTON_HPP_
20 |
21 | #include "Button.hpp"
22 | #include "Label.hpp"
23 |
24 | namespace BWidgets
25 | {
26 | /**
27 | * Class BWidgets::PlusButton
28 | *
29 | * Text button widget. Is is a BWidgets::Button and thus a
30 | * BWidgets::ValueWidget having two conditions: on (value != 0) or off
31 | * (value == 0)
32 | */
33 | class PlusButton : public Button
34 | {
35 | public:
36 | PlusButton ();
37 | PlusButton (const double x, const double y, const double width, const double height, const std::string& name, double defaultValue = 0.0);
38 |
39 | /**
40 | * Pattern cloning. Creates a new instance of the widget and copies all
41 | * its properties.
42 | */
43 | virtual Widget* clone () const override;
44 |
45 | protected:
46 | virtual void draw (const BUtilities::RectArea& area) override;
47 | };
48 |
49 | }
50 |
51 | #endif /* BWIDGETS_PLUSBUTTON_HPP_ */
52 |
--------------------------------------------------------------------------------
/src/BWidgets/RightButton.hpp:
--------------------------------------------------------------------------------
1 | /* RightButton.hpp
2 | * Copyright (C) 2018, 2019 Sven Jähnichen
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef BWIDGETS_RIGHTBUTTON_HPP_
19 | #define BWIDGETS_RIGHTBUTTON_HPP_
20 |
21 | #include "Button.hpp"
22 | #include "Label.hpp"
23 |
24 | namespace BWidgets
25 | {
26 | /**
27 | * Class BWidgets::RightButton
28 | *
29 | * Text button widget. Is is a BWidgets::Button and thus a
30 | * BWidgets::ValueWidget having two conditions: on (value != 0) or off
31 | * (value == 0)
32 | */
33 | class RightButton : public Button
34 | {
35 | public:
36 | RightButton ();
37 | RightButton (const double x, const double y, const double width, const double height, const std::string& name, double defaultValue = 0.0);
38 |
39 | /**
40 | * Pattern cloning. Creates a new instance of the widget and copies all
41 | * its properties.
42 | */
43 | virtual Widget* clone () const override;
44 |
45 | protected:
46 | virtual void draw (const BUtilities::RectArea& area) override;
47 | };
48 |
49 | }
50 |
51 | #endif /* BWIDGETS_RIGHTBUTTON_HPP_ */
52 |
--------------------------------------------------------------------------------
/src/BWidgets/StateDisplay.cpp:
--------------------------------------------------------------------------------
1 | /* StateDisplay.cpp
2 | * Copyright (C) 2019 Sven Jähnichen
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #include "StateDisplay.hpp"
19 |
20 | namespace BWidgets
21 | {
22 | StateDisplay::StateDisplay () : StateDisplay (0.0, 0.0, 0.0, 0.0, "display") {}
23 |
24 | StateDisplay::StateDisplay (const double x, const double y, const double width,
25 | const double height, const std::string& text) :
26 | Display (x, y, width, height, text)
27 | {
28 |
29 | }
30 |
31 | Widget* StateDisplay::clone () const {return new StateDisplay (*this);}
32 |
33 | bool StateDisplay::filter (Widget* widget) {return (getState () == widget->getState ());}
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/src/BWidgets/StateDisplay.hpp:
--------------------------------------------------------------------------------
1 | /* StateDisplay.hpp
2 | * Copyright (C) 2019 Sven Jähnichen
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef BWIDGETS_STATEDISPLAY_HPP_
19 | #define BWIDGETS_STATEDISPLAY_HPP_
20 |
21 | #include "Display.hpp"
22 |
23 | namespace BWidgets
24 | {
25 |
26 | /**
27 | * Class BWidgets::StateDisplay
28 | *
29 | * Display widget that displays only child widgets of the same state.
30 | */
31 | class StateDisplay : public Display
32 | {
33 | public:
34 | StateDisplay ();
35 | StateDisplay (const double x, const double y, const double width, const double height,
36 | const std::string& text);
37 |
38 | /**
39 | * Pattern cloning. Creates a new instance of the widget and copies all
40 | * its properties.
41 | */
42 | virtual Widget* clone () const override;
43 |
44 | protected:
45 | virtual bool filter (Widget* widget) override;
46 | };
47 |
48 | }
49 |
50 | #endif /* BWIDGETS_STATEDISPLAY_HPP_ */
51 |
--------------------------------------------------------------------------------
/src/BWidgets/ToggleButton.cpp:
--------------------------------------------------------------------------------
1 | /* ToggleButton.cpp
2 | * Copyright (C) 2018 Sven Jähnichen
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #include "ToggleButton.hpp"
19 |
20 | namespace BWidgets
21 | {
22 | ToggleButton::ToggleButton () : ToggleButton (0.0, 0.0, BWIDGETS_DEFAULT_BUTTON_WIDTH, BWIDGETS_DEFAULT_BUTTON_HEIGHT, "togglebutton", 0.0) {}
23 |
24 | ToggleButton::ToggleButton (const double x, const double y, const double width, const double height, const std::string& name, double defaultValue) :
25 | Button (x, y, width, height, name, defaultValue) {}
26 |
27 | Widget* ToggleButton::clone () const {return new ToggleButton (*this);}
28 |
29 | void ToggleButton::onButtonPressed (BEvents::PointerEvent* event)
30 | {
31 | if (getValue ()) setValue (0.0);
32 | else setValue (1.0);
33 |
34 | Widget::cbfunction_[BEvents::EventType::BUTTON_PRESS_EVENT] (event);
35 | }
36 |
37 | void ToggleButton::onButtonReleased (BEvents::PointerEvent* event)
38 | {
39 | Widget::cbfunction_[BEvents::EventType::BUTTON_RELEASE_EVENT] (event);
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/src/BWidgets/ToggleButton.hpp:
--------------------------------------------------------------------------------
1 | /* ToggleButton.hpp
2 | * Copyright (C) 2018 Sven Jähnichen
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef BWIDGETS_TOGGLEBUTTON_HPP_
19 | #define BWIDGETS_TOGGLEBUTTON_HPP_
20 |
21 | #include "Button.hpp"
22 |
23 | namespace BWidgets
24 | {
25 | /**
26 | * Class BWidgets::ToggleButton
27 | *
28 | * Basic toggle button widget. Is is a BWidgets::Button and thus a
29 | * BWidgets::ValueWidget having two conditions: on (value != 0) or off
30 | * (value == 0)
31 | */
32 | class ToggleButton : public Button
33 | {
34 | public:
35 | ToggleButton ();
36 | ToggleButton (const double x, const double y, const double width, const double height, const std::string& name, double defaultValue = 0.0);
37 |
38 | /**
39 | * Pattern cloning. Creates a new instance of the widget and copies all
40 | * its properties.
41 | */
42 | virtual Widget* clone () const override;
43 |
44 | /**
45 | * Handles the BEvents::BUTTON_PRESS_EVENT.
46 | * @param event Pointer to a pointer event emitted by the same widget.
47 | */
48 | virtual void onButtonPressed (BEvents::PointerEvent* event) override;
49 |
50 | /**
51 | * Overrides the BEvents::BUTTON_RELEASED_EVENT handled by
52 | * BWidgets::Button.
53 | * @param event Pointer to a pointer event emitted by the same widget.
54 | */
55 | virtual void onButtonReleased (BEvents::PointerEvent* event) override;
56 | };
57 |
58 | }
59 |
60 |
61 |
62 |
63 | #endif /* BWIDGETS_TOGGLEBUTTON_HPP_ */
64 |
--------------------------------------------------------------------------------
/src/BWidgets/UpButton.hpp:
--------------------------------------------------------------------------------
1 | /* UpButton.hpp
2 | * Copyright (C) 2018, 2019 Sven Jähnichen
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef BWIDGETS_UPBUTTON_HPP_
19 | #define BWIDGETS_UPBUTTON_HPP_
20 |
21 | #include "Button.hpp"
22 | #include "Label.hpp"
23 |
24 | namespace BWidgets
25 | {
26 | /**
27 | * Class BWidgets::UpButton
28 | *
29 | * Text button widget. Is is a BWidgets::Button and thus a
30 | * BWidgets::ValueWidget having two conditions: on (value != 0) or off
31 | * (value == 0)
32 | */
33 | class UpButton : public Button
34 | {
35 | public:
36 | UpButton ();
37 | UpButton (const double x, const double y, const double width, const double height, const std::string& name, double defaultValue = 0.0);
38 |
39 | /**
40 | * Pattern cloning. Creates a new instance of the widget and copies all
41 | * its properties.
42 | */
43 | virtual Widget* clone () const override;
44 |
45 | protected:
46 | virtual void draw (const BUtilities::RectArea& area) override;
47 | };
48 |
49 | }
50 |
51 | #endif /* BWIDGETS_TOGGLEBUTTON_HPP_ */
52 |
--------------------------------------------------------------------------------
/src/BWidgets/VSwitch.cpp:
--------------------------------------------------------------------------------
1 | /* VSwitch.cpp
2 | * Copyright (C) 2018, 2019 Sven Jähnichen
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #include "VSwitch.hpp"
19 |
20 | namespace BWidgets
21 | {
22 | VSwitch::VSwitch () : VSwitch (0.0, 0.0, BWIDGETS_DEFAULT_VSWITCH_WIDTH, BWIDGETS_DEFAULT_VSWITCH_HEIGHT, "vswitch", BWIDGETS_DEFAULT_VALUE) {}
23 |
24 | VSwitch::VSwitch (const double x, const double y, const double width, const double height, const std::string& name,
25 | const double defaultvalue) :
26 | VSlider (x, y, width, height, name, defaultvalue, 0.0, 1.0, 1.0), dragged (false) {}
27 |
28 | Widget* VSwitch::clone () const {return new VSwitch (*this);}
29 |
30 | void VSwitch::onButtonPressed (BEvents::PointerEvent* event) {dragged = false;}
31 |
32 | void VSwitch::onButtonReleased (BEvents::PointerEvent* event)
33 | {
34 | if (!dragged)
35 | {
36 | if (getValue() == getMin ()) setValue (getMax ());
37 | else setValue (getMin ());
38 | }
39 | }
40 |
41 | void VSwitch::onPointerDragged (BEvents::PointerEvent* event)
42 | {
43 | dragged = true;
44 | VScale::onButtonPressed (event);
45 | }
46 |
47 | void VSwitch::updateCoords ()
48 | {
49 | double w = getEffectiveWidth ();
50 | double h = getEffectiveHeight ();
51 |
52 | knobRadius = (w < h / 2 ? w / 2 : h / 4);
53 | scaleArea = BUtilities::RectArea
54 | (
55 | getXOffset () + w / 2 - knobRadius,
56 | getYOffset (),
57 | 2 * knobRadius,
58 | h
59 | );
60 | scaleYValue = scaleArea.getY() + knobRadius + (1 - getRelativeValue ()) * (scaleArea.getHeight() - 2 * knobRadius);
61 |
62 | knobPosition = BUtilities::Point
63 | (
64 | scaleArea.getX() + scaleArea.getWidth() / 2 + BWIDGETS_DEFAULT_KNOB_DEPTH,
65 | scaleYValue + BWIDGETS_DEFAULT_KNOB_DEPTH
66 | );
67 | }
68 |
69 | }
70 |
--------------------------------------------------------------------------------
/src/BWidgets/VSwitch.hpp:
--------------------------------------------------------------------------------
1 | /* VSwitch.hpp
2 | * Copyright (C) 2018 Sven Jähnichen
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef BWIDGETS_VSWITCH_HPP_
19 | #define BWIDGETS_VSWITCH_HPP_
20 |
21 | #include "Knob.hpp"
22 | #include "VSlider.hpp"
23 |
24 | #define BWIDGETS_DEFAULT_VSWITCH_WIDTH 40.0
25 | #define BWIDGETS_DEFAULT_VSWITCH_HEIGHT 20.0
26 | #define BWIDGETS_DEFAULT_VSWITCH_DEPTH 1.0
27 |
28 | namespace BWidgets
29 | {
30 | /**
31 | * Class BWidgets::VSwitch
32 | *
33 | * On/OFF switch widget. Is is a BWidgets::VSlider having two conditions: on
34 | * (value != 0) or off (value == 0)
35 | */
36 | class VSwitch : public VSlider
37 | {
38 | public:
39 | VSwitch ();
40 | VSwitch (const double x, const double y, const double width, const double height, const std::string& name, const double defaultvalue);
41 |
42 | /**
43 | * Pattern cloning. Creates a new instance of the widget and copies all
44 | * its properties.
45 | */
46 | virtual Widget* clone () const override;
47 |
48 | /**
49 | * Handles the BEvents::BUTTON_PRESS_EVENT to move the slider.
50 | * @param event Pointer to a pointer event emitted by the same widget.
51 | */
52 | virtual void onButtonPressed (BEvents::PointerEvent* event) override;
53 |
54 | /**
55 | * Handles the BEvents::EventType::BUTTON_RELEASE_EVENT to move the slider.
56 | * @param event Pointer event
57 | */
58 | virtual void onButtonReleased (BEvents::PointerEvent* event) override;
59 |
60 | /**
61 | * Handles the BEvents::POINTER_DRAG_EVENT to move
62 | * the slider.
63 | * @param event Pointer to a pointer event emitted by the same widget.
64 | */
65 | virtual void onPointerDragged (BEvents::PointerEvent* event) override;
66 |
67 | protected:
68 | virtual void updateCoords () override;
69 |
70 | bool dragged;
71 | };
72 |
73 | }
74 |
75 | #endif /* BWIDGETS_VSWITCH_HPP_ */
76 |
--------------------------------------------------------------------------------
/src/BWidgets/pugl/.clang-tidy:
--------------------------------------------------------------------------------
1 | Checks: >
2 | *,
3 | -*-uppercase-literal-suffix,
4 | -*magic-numbers,
5 | -bugprone-reserved-identifier,
6 | -bugprone-suspicious-string-compare,
7 | -cert-dcl37-c,
8 | -cert-dcl51-cpp,
9 | -cert-flp30-c,
10 | -clang-analyzer-security.FloatLoopCounter,
11 | -clang-diagnostic-unused-macros,
12 | -hicpp-multiway-paths-covered,
13 | -hicpp-signed-bitwise,
14 | -llvm-header-guard,
15 | -llvmlibc-*,
16 | FormatStyle: file
17 | HeaderFilterRegex: 'pugl/.*'
18 |
--------------------------------------------------------------------------------
/src/BWidgets/pugl/AUTHORS:
--------------------------------------------------------------------------------
1 | Pugl is primarily written and maintained by David Robillard
2 | with contributions from (in increasing chronological order):
3 |
4 | Ben Loftis
5 | Robin Gareus
6 | Erik Åldstedt Sund
7 | Hanspeter Portner
8 | Stefan Westerfeld
9 | Jordan Halase
10 | Oliver Schmidt
11 | Zoë Sparks
12 | Jean Pierre Cimalando
13 | Thomas Brand
14 |
--------------------------------------------------------------------------------
/src/BWidgets/pugl/COPYING:
--------------------------------------------------------------------------------
1 | Copyright 2011-2020 David Robillard
2 |
3 | Permission to use, copy, modify, and/or distribute this software for any
4 | purpose with or without fee is hereby granted, provided that the above
5 | copyright notice and this permission notice appear in all copies.
6 |
7 | THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14 |
--------------------------------------------------------------------------------
/src/BWidgets/pugl/mac.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2012-2020 David Robillard
3 | Copyright 2017 Hanspeter Portner
4 |
5 | Permission to use, copy, modify, and/or distribute this software for any
6 | purpose with or without fee is hereby granted, provided that the above
7 | copyright notice and this permission notice appear in all copies.
8 |
9 | THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 | */
17 |
18 | #ifndef PUGL_DETAIL_MAC_H
19 | #define PUGL_DETAIL_MAC_H
20 |
21 | #include "pugl/pugl.h"
22 |
23 | #import
24 |
25 | #include
26 |
27 | @interface PuglWrapperView : NSView
28 |
29 | - (void)dispatchExpose:(NSRect)rect;
30 | - (void)setReshaped;
31 |
32 | @end
33 |
34 | @interface PuglWindow : NSWindow
35 |
36 | - (void)setPuglview:(PuglView*)view;
37 |
38 | @end
39 |
40 | struct PuglWorldInternalsImpl {
41 | NSApplication* app;
42 | NSAutoreleasePool* autoreleasePool;
43 | };
44 |
45 | struct PuglInternalsImpl {
46 | NSApplication* app;
47 | PuglWrapperView* wrapperView;
48 | NSView* drawView;
49 | NSCursor* cursor;
50 | PuglWindow* window;
51 | uint32_t mods;
52 | bool mouseTracked;
53 | };
54 |
55 | #endif // PUGL_DETAIL_MAC_H
56 |
--------------------------------------------------------------------------------
/src/BWidgets/pugl/pugl/cairo.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2012-2020 David Robillard
3 |
4 | Permission to use, copy, modify, and/or distribute this software for any
5 | purpose with or without fee is hereby granted, provided that the above
6 | copyright notice and this permission notice appear in all copies.
7 |
8 | THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 | */
16 |
17 | #ifndef PUGL_CAIRO_H
18 | #define PUGL_CAIRO_H
19 |
20 | #include "pugl.h"
21 |
22 | PUGL_BEGIN_DECLS
23 |
24 | /**
25 | @defgroup cairo Cairo
26 | Cairo graphics support.
27 | @ingroup pugl
28 | @{
29 | */
30 |
31 | /**
32 | Cairo graphics backend accessor.
33 |
34 | Pass the returned value to puglSetBackend() to draw to a view with Cairo.
35 | */
36 | PUGL_CONST_API
37 | const PuglBackend*
38 | puglCairoBackend(void);
39 |
40 | /**
41 | @}
42 | */
43 |
44 | PUGL_END_DECLS
45 |
46 | #endif // PUGL_CAIRO_H
47 |
--------------------------------------------------------------------------------
/src/BWidgets/pugl/pugl/stub.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2019-2020 David Robillard
3 |
4 | Permission to use, copy, modify, and/or distribute this software for any
5 | purpose with or without fee is hereby granted, provided that the above
6 | copyright notice and this permission notice appear in all copies.
7 |
8 | THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 | */
16 |
17 | #ifndef PUGL_STUB_H
18 | #define PUGL_STUB_H
19 |
20 | #include "pugl.h"
21 |
22 | PUGL_BEGIN_DECLS
23 |
24 | /**
25 | @defgroup stub Stub
26 | Native graphics support.
27 | @ingroup pugl
28 | @{
29 | */
30 |
31 | /**
32 | Stub graphics backend accessor.
33 |
34 | This backend just creates a simple native window without setting up any
35 | portable graphics API.
36 | */
37 | PUGL_CONST_API
38 | const PuglBackend*
39 | puglStubBackend(void);
40 |
41 | /**
42 | @}
43 | */
44 |
45 | PUGL_END_DECLS
46 |
47 | #endif // PUGL_STUB_H
48 |
--------------------------------------------------------------------------------
/src/BWidgets/pugl/stub.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2012-2020 David Robillard
3 |
4 | Permission to use, copy, modify, and/or distribute this software for any
5 | purpose with or without fee is hereby granted, provided that the above
6 | copyright notice and this permission notice appear in all copies.
7 |
8 | THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 | */
16 |
17 | #ifndef PUGL_DETAIL_STUB_H
18 | #define PUGL_DETAIL_STUB_H
19 |
20 | #include "pugl/pugl.h"
21 |
22 | #include
23 |
24 | PUGL_BEGIN_DECLS
25 |
26 | static inline PuglStatus
27 | puglStubConfigure(PuglView* view)
28 | {
29 | (void)view;
30 | return PUGL_SUCCESS;
31 | }
32 |
33 | static inline PuglStatus
34 | puglStubCreate(PuglView* view)
35 | {
36 | (void)view;
37 | return PUGL_SUCCESS;
38 | }
39 |
40 | static inline PuglStatus
41 | puglStubDestroy(PuglView* view)
42 | {
43 | (void)view;
44 | return PUGL_SUCCESS;
45 | }
46 |
47 | static inline PuglStatus
48 | puglStubEnter(PuglView* view, const PuglEventExpose* expose)
49 | {
50 | (void)view;
51 | (void)expose;
52 | return PUGL_SUCCESS;
53 | }
54 |
55 | static inline PuglStatus
56 | puglStubLeave(PuglView* view, const PuglEventExpose* expose)
57 | {
58 | (void)view;
59 | (void)expose;
60 | return PUGL_SUCCESS;
61 | }
62 |
63 | static inline void*
64 | puglStubGetContext(PuglView* view)
65 | {
66 | (void)view;
67 | return NULL;
68 | }
69 |
70 | PUGL_END_DECLS
71 |
72 | #endif // PUGL_DETAIL_STUB_H
73 |
--------------------------------------------------------------------------------
/src/BWidgets/pugl/win_stub.c:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2012-2020 David Robillard
3 |
4 | Permission to use, copy, modify, and/or distribute this software for any
5 | purpose with or without fee is hereby granted, provided that the above
6 | copyright notice and this permission notice appear in all copies.
7 |
8 | THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 | */
16 |
17 | #include "stub.h"
18 | #include "types.h"
19 | #include "win.h"
20 |
21 | #include "pugl/stub.h"
22 |
23 | PuglStatus
24 | puglWinStubConfigure(PuglView* view)
25 | {
26 | PuglInternals* const impl = view->impl;
27 | PuglStatus st = PUGL_SUCCESS;
28 |
29 | if ((st = puglWinCreateWindow(view, "Pugl", &impl->hwnd, &impl->hdc))) {
30 | return st;
31 | }
32 |
33 | impl->pfd = puglWinGetPixelFormatDescriptor(view->hints);
34 | impl->pfId = ChoosePixelFormat(impl->hdc, &impl->pfd);
35 |
36 | if (!SetPixelFormat(impl->hdc, impl->pfId, &impl->pfd)) {
37 | ReleaseDC(impl->hwnd, impl->hdc);
38 | DestroyWindow(impl->hwnd);
39 | impl->hwnd = NULL;
40 | impl->hdc = NULL;
41 | return PUGL_SET_FORMAT_FAILED;
42 | }
43 |
44 | return PUGL_SUCCESS;
45 | }
46 |
47 | PuglStatus
48 | puglWinStubEnter(PuglView* view, const PuglEventExpose* expose)
49 | {
50 | if (expose) {
51 | PAINTSTRUCT ps;
52 | BeginPaint(view->impl->hwnd, &ps);
53 | }
54 |
55 | return PUGL_SUCCESS;
56 | }
57 |
58 | PuglStatus
59 | puglWinStubLeave(PuglView* view, const PuglEventExpose* expose)
60 | {
61 | if (expose) {
62 | PAINTSTRUCT ps;
63 | EndPaint(view->impl->hwnd, &ps);
64 | }
65 |
66 | return PUGL_SUCCESS;
67 | }
68 |
69 | const PuglBackend*
70 | puglStubBackend(void)
71 | {
72 | static const PuglBackend backend = {puglWinStubConfigure,
73 | puglStubCreate,
74 | puglStubDestroy,
75 | puglWinStubEnter,
76 | puglWinStubLeave,
77 | puglStubGetContext};
78 |
79 | return &backend;
80 | }
81 |
--------------------------------------------------------------------------------
/src/BWidgets/pugl/x11.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2012-2020 David Robillard
3 |
4 | Permission to use, copy, modify, and/or distribute this software for any
5 | purpose with or without fee is hereby granted, provided that the above
6 | copyright notice and this permission notice appear in all copies.
7 |
8 | THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 | */
16 |
17 | #ifndef PUGL_DETAIL_X11_H
18 | #define PUGL_DETAIL_X11_H
19 |
20 | #include "types.h"
21 |
22 | #include "pugl/pugl.h"
23 |
24 | #include
25 | #include
26 | #include
27 |
28 | #include
29 | #include
30 | #include
31 |
32 | typedef struct {
33 | Atom CLIPBOARD;
34 | Atom UTF8_STRING;
35 | Atom WM_PROTOCOLS;
36 | Atom WM_DELETE_WINDOW;
37 | Atom PUGL_CLIENT_MSG;
38 | Atom NET_WM_NAME;
39 | Atom NET_WM_STATE;
40 | Atom NET_WM_STATE_DEMANDS_ATTENTION;
41 | } PuglX11Atoms;
42 |
43 | typedef struct {
44 | XID alarm;
45 | PuglView* view;
46 | uintptr_t id;
47 | } PuglTimer;
48 |
49 | struct PuglWorldInternalsImpl {
50 | Display* display;
51 | PuglX11Atoms atoms;
52 | XIM xim;
53 | PuglTimer* timers;
54 | size_t numTimers;
55 | XID serverTimeCounter;
56 | int syncEventBase;
57 | bool syncSupported;
58 | bool dispatchingEvents;
59 | };
60 |
61 | struct PuglInternalsImpl {
62 | Display* display;
63 | XVisualInfo* vi;
64 | Window win;
65 | XIC xic;
66 | PuglSurface* surface;
67 | PuglEvent pendingConfigure;
68 | PuglEvent pendingExpose;
69 | int screen;
70 | #ifdef HAVE_XCURSOR
71 | unsigned cursorShape;
72 | #endif
73 | };
74 |
75 | PuglStatus
76 | puglX11StubConfigure(PuglView* view);
77 |
78 | #endif // PUGL_DETAIL_X11_H
79 |
--------------------------------------------------------------------------------
/src/BWidgets/pugl/x11_stub.c:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2012-2020 David Robillard
3 |
4 | Permission to use, copy, modify, and/or distribute this software for any
5 | purpose with or without fee is hereby granted, provided that the above
6 | copyright notice and this permission notice appear in all copies.
7 |
8 | THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 | */
16 |
17 | #include "pugl/stub.h"
18 |
19 | #include "stub.h"
20 | #include "types.h"
21 | #include "x11.h"
22 |
23 | #include "pugl/pugl.h"
24 |
25 | #include
26 |
27 | PuglStatus
28 | puglX11StubConfigure(PuglView* view)
29 | {
30 | PuglInternals* const impl = view->impl;
31 | XVisualInfo pat = {0};
32 | int n = 0;
33 |
34 | pat.screen = impl->screen;
35 | impl->vi = XGetVisualInfo(impl->display, VisualScreenMask, &pat, &n);
36 |
37 | view->hints[PUGL_RED_BITS] = impl->vi->bits_per_rgb;
38 | view->hints[PUGL_GREEN_BITS] = impl->vi->bits_per_rgb;
39 | view->hints[PUGL_BLUE_BITS] = impl->vi->bits_per_rgb;
40 | view->hints[PUGL_ALPHA_BITS] = 0;
41 |
42 | return PUGL_SUCCESS;
43 | }
44 |
45 | const PuglBackend*
46 | puglStubBackend(void)
47 | {
48 | static const PuglBackend backend = {
49 | puglX11StubConfigure,
50 | puglStubCreate,
51 | puglStubDestroy,
52 | puglStubEnter,
53 | puglStubLeave,
54 | puglStubGetContext,
55 | };
56 |
57 | return &backend;
58 | }
59 |
--------------------------------------------------------------------------------
/src/BiquadPeakFilter.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2020 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | // Adapted from https://www.earlevel.com/main/2012/11/26/biquad-c-source-code/
22 |
23 | #ifndef BIQUADPEAKFILTER_HPP_
24 | #define BIQUADPEAKFILTER_HPP_
25 |
26 | #include "Biquad.hpp"
27 |
28 | class BiquadPeakFilter : public Biquad
29 | {
30 | public:
31 | BiquadPeakFilter() : BiquadPeakFilter (48000) {}
32 | BiquadPeakFilter (const double rate) : Biquad (rate) {}
33 |
34 | protected:
35 | virtual void build() override
36 | {
37 | float norm;
38 | const float V = powf (10.0f, fabsf (gain) / 20.0f);
39 | const float K = tanf (M_PI * Fc);
40 |
41 | if (gain >= 0)
42 | {
43 | norm = 1.0f / (1.0f + 1.0f / Q * K + K * K);
44 | a0 = (1.0f + V / Q * K + K * K) * norm;
45 | a1 = 2.0f * (K * K - 1.0f) * norm;
46 | a2 = (1.0f - V / Q * K + K * K) * norm;
47 | b1 = a1;
48 | b2 = (1.0f - 1.0f / Q * K + K * K) * norm;
49 | }
50 |
51 | else
52 | {
53 | norm = 1.0f / (1.0f + V / Q * K + K * K);
54 | a0 = (1.0f + 1.0f / Q * K + K * K) * norm;
55 | a1 = 2.0f * (K * K - 1.0f) * norm;
56 | a2 = (1.0f - 1.0f / Q * K + K * K) * norm;
57 | b1 = a1;
58 | b2 = (1.0f - V / Q * K + K * K) * norm;
59 | }
60 | }
61 | };
62 |
63 | #endif /* BIQUADPEAKFILTER_HPP_ */
64 |
--------------------------------------------------------------------------------
/src/ButterworthBandPassFilter.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2020 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef BUTTERWORTHBANDPASSFILTER_HPP_
22 | #define BUTTERWORTHBANDPASSFILTER_HPP_
23 |
24 | #include "ButterworthLowPassFilter.hpp"
25 | #include "ButterworthHighPassFilter.hpp"
26 |
27 | class ButterworthBandPassFilter
28 | {
29 | public:
30 | ButterworthBandPassFilter (const double rate, const double lowCutoff, const double highCutoff, const int order) :
31 | lowpass (rate, highCutoff, order),
32 | highpass (rate, lowCutoff, order)
33 | {
34 |
35 | }
36 |
37 | void set (const double rate, const double lowCutoff, const double highCutoff, const int order)
38 | {
39 | lowpass.set (rate, highCutoff, order);
40 | highpass.set (rate, lowCutoff, order);
41 | }
42 |
43 | Stereo push (const Stereo& input) {return highpass.push (lowpass.push (input));}
44 |
45 | Stereo get () const {return highpass.get();}
46 |
47 | void clear()
48 | {
49 | lowpass.clear();
50 | highpass.clear();
51 | }
52 |
53 |
54 | protected:
55 | ButterworthLowPassFilter lowpass;
56 | ButterworthHighPassFilter highpass;
57 | };
58 |
59 | #endif /* BUTTERWORTHBANDPASSFILTER_HPP_ */
60 |
--------------------------------------------------------------------------------
/src/ButterworthFilter.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2020 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef BUTTERWORTHFILTER_HPP_
22 | #define BUTTERWORTHFILTER_HPP_
23 |
24 | #include
25 | #include
26 | #include "Stereo.hpp"
27 |
28 | #define BUTTERWORTH_MAXORDER 16
29 |
30 | class ButterworthFilter
31 | {
32 | public:
33 | ButterworthFilter() : ButterworthFilter (0) {}
34 |
35 | ButterworthFilter (const int order) :
36 | order (order),
37 | o2 (order / 2),
38 | f1 (1)
39 | {
40 | coeff0.fill (0);
41 | coeff1.fill (0);
42 | coeff2.fill (0);
43 | clear();
44 | }
45 |
46 | Stereo push (const Stereo& input)
47 | {
48 | output = input;
49 |
50 | for (int i = 0; i < o2; ++i)
51 | {
52 | buffer0[i] = buffer1[i] * coeff1[i] + buffer2[i] * coeff2[i] + output;
53 | output = (buffer0[i] + buffer1[i] * f1 + buffer2[i]) * coeff0[i];
54 | buffer2[i] = buffer1[i];
55 | buffer1[i] = buffer0[i];
56 | }
57 |
58 | return output;
59 | }
60 |
61 | Stereo get() const {return output;}
62 |
63 | void clear()
64 | {
65 | buffer0.fill (Stereo());
66 | buffer1.fill (Stereo());
67 | buffer2.fill (Stereo());
68 | }
69 |
70 |
71 | protected:
72 | int order;
73 | int o2;
74 | std::array coeff0;
75 | std::array coeff1;
76 | std::array coeff2;
77 | float f1;
78 | std::array buffer0;
79 | std::array buffer1;
80 | std::array buffer2;
81 | Stereo output;
82 | };
83 |
84 | #endif /* BUTTERWORTHFILTER_HPP_ */
85 |
--------------------------------------------------------------------------------
/src/ButterworthHighPassFilter.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2020 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef BUTTERWORTHHIGHPASSFILTER_HPP_
22 | #define BUTTERWORTHHIGHPASSFILTER_HPP_
23 |
24 | #include "ButterworthFilter.hpp"
25 |
26 | class ButterworthHighPassFilter : public ButterworthFilter
27 | {
28 | public:
29 | ButterworthHighPassFilter (const double rate, const double cutoff, const int order) :
30 | ButterworthFilter (order)
31 |
32 | {
33 | set (rate, cutoff, order);
34 | }
35 |
36 | void set (const double rate, const double cutoff, const int order)
37 | {
38 |
39 | this->order = order;
40 | o2 = order / 2;
41 | f1 = -2;
42 | const double a = tan (M_PI * cutoff / rate);
43 | const double a2 = a * a;
44 |
45 | for (int i = 0; i < o2; ++i)
46 | {
47 | const double r = sin (M_PI * (2.0 * double (i) + 1.0) / (2.0 * double (order)));
48 | const double s = a2 + 2.0 * a * r + 1.0;
49 | coeff0[i] = 1.0 / s;
50 | coeff1[i] = 2.0 * (1.0 - a2) / s;
51 | coeff2[i] = -(a2 - 2.0 * a * r + 1.0) / s;
52 | }
53 | }
54 | };
55 |
56 | #endif /* BUTTERWORTHHIGHPASSFILTER_HPP_ */
57 |
--------------------------------------------------------------------------------
/src/ButterworthLowPassFilter.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2020 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef BUTTERWORTHLOWPASSFILTER_HPP_
22 | #define BUTTERWORTHLOWPASSFILTER_HPP_
23 |
24 | #include "ButterworthFilter.hpp"
25 |
26 | class ButterworthLowPassFilter : public ButterworthFilter
27 | {
28 | public:
29 | ButterworthLowPassFilter (const double rate, const double cutoff, const int order) :
30 | ButterworthFilter (order)
31 | {
32 | set (rate, cutoff, order);
33 | }
34 |
35 | void set (const double rate, const double cutoff, const int order)
36 | {
37 |
38 | this->order = order;
39 | o2 = order / 2;
40 | f1 = 2;
41 |
42 | const double a = tan (M_PI * cutoff / rate);
43 | const double a2 = a * a;
44 |
45 | for (int i = 0; i < o2; ++i)
46 | {
47 | const double r = sin (M_PI * (2.0 * double (i) + 1.0) / (2.0 * double (order)));
48 | const double s = a2 + 2.0 * a * r + 1.0;
49 | coeff0[i] = a2 / s;
50 | coeff1[i] = 2.0 * (1.0 - a2) / s;
51 | coeff2[i] = -(a2 - 2.0 * a * r + 1.0) / s;
52 | }
53 | }
54 |
55 | };
56 |
57 | #endif /* BUTTERWORTHLOWPASSFILTER_HPP_ */
58 |
--------------------------------------------------------------------------------
/src/Crackle.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2020 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef CRACKLE_HPP_
22 | #define CRACKLE_HPP_
23 |
24 | #include
25 |
26 | #ifndef SQR
27 | #define SQR(x) ((x) * (x))
28 | #endif
29 |
30 | class Crackle
31 | {
32 | public:
33 | Crackle () : Crackle (0, 0, 0) {}
34 |
35 | Crackle (const double t0, const double level, const double freq) :
36 | t0_ (t0),
37 | level_ (level),
38 | freq_ (freq)
39 | {}
40 |
41 | double get (const double t) const {return level_ * sin (2.0 * M_PI * sqrt ((t - t0_) * freq_)) / (1.0 + SQR ((t - t0_) * freq_ - 2.0));}
42 |
43 | double getAmplitude (const double t) const {return 1.0 / (1.0 + SQR ((t - t0_) * freq_ - 2.0));}
44 |
45 | protected:
46 | double t0_;
47 | double level_;
48 | double freq_;
49 | };
50 |
51 | #endif /* CRACKLE_HPP_ */
52 |
--------------------------------------------------------------------------------
/src/Definitions.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2020 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef DEFINITIONS_HPP_
22 | #define DEFINITIONS_HPP_
23 |
24 | #define NR_STEPS 32
25 | #define SHAPE_MAXNODES 32
26 | #define MAXUNDO 20
27 | #define FADINGTIME 0.01
28 | #define GRIDSIZE 2.0
29 | #define NR_PIANO_KEYS 120
30 | #define NR_PAGES 16
31 | #define NR_MIDI_CTRLS 4
32 | #define WAVEFORMSIZE 1024
33 | #define BOOPS_URI "https://www.jahnichen.de/plugins/lv2/BOops"
34 | #define BOOPS_GUI_URI "https://www.jahnichen.de/plugins/lv2/BOops#gui"
35 |
36 | #endif /* DEFINITIONS_HPP_ */
37 |
--------------------------------------------------------------------------------
/src/DownClick.cpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2019 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #include "DownClick.hpp"
22 |
23 | DownClick::DownClick () : DownClick (0.0, 0.0, BWIDGETS_DEFAULT_BUTTON_WIDTH, BWIDGETS_DEFAULT_BUTTON_HEIGHT, "togglebutton", 0.0) {}
24 |
25 | DownClick::DownClick (const double x, const double y, const double width, const double height, const std::string& name, double defaultValue) :
26 | Button (x, y, width, height, name, defaultValue) {}
27 |
28 | void DownClick::draw (const BUtilities::RectArea& area)
29 | {
30 | if ((!widgetSurface_) || (cairo_surface_status (widgetSurface_) != CAIRO_STATUS_SUCCESS)) return;
31 |
32 | if ((area.getWidth() >= 6) && (area.getHeight() >= 6))
33 | {
34 | // Draw super class widget elements first
35 | Widget::draw (area);
36 |
37 | cairo_t* cr = cairo_create (widgetSurface_);
38 | if (cairo_status (cr) == CAIRO_STATUS_SUCCESS)
39 | {
40 | // Limit cairo-drawing area
41 | cairo_rectangle (cr, area.getX(), area.getY(), area.getWidth(), area.getHeight());
42 | cairo_clip (cr);
43 |
44 | double x0 = getXOffset ();
45 | double y0 = getYOffset ();
46 | double w = getEffectiveWidth ();
47 | double h = getEffectiveHeight ();
48 | BColors::Color butColor = *bgColors.getColor (value == 1 ? BColors::ACTIVE : BColors::NORMAL);
49 |
50 | cairo_move_to (cr, x0, y0 + 0.25 * h);
51 | cairo_line_to (cr, x0 + 0.5 * w, y0 + 0.75 * h);
52 | cairo_line_to (cr, x0 + w, y0 + 0.25 * h);
53 |
54 | cairo_set_line_width (cr, 2);
55 | cairo_set_source_rgba (cr, CAIRO_RGBA (butColor));
56 | cairo_stroke (cr);
57 |
58 | cairo_destroy (cr);
59 | }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/src/DownClick.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2019 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef DOWNCLICK_HPP_
22 | #define DOWNCLICK_HPP_
23 |
24 | #include "BWidgets/Button.hpp"
25 |
26 | class DownClick : public BWidgets::Button
27 | {
28 | public:
29 | DownClick ();
30 | DownClick (const double x, const double y, const double width, const double height, const std::string& name, double defaultValue = 0);
31 |
32 | virtual void draw (const BUtilities::RectArea& area) override;
33 | };
34 |
35 | #endif /* DOWNCLICK_HPP_ */
36 |
--------------------------------------------------------------------------------
/src/FxAmp.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2020 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef FXAMP_HPP_
22 | #define FXAMP_HPP_
23 |
24 | #include "Fx.hpp"
25 |
26 | #define FX_AMP_AMP 0
27 | #define FX_AMP_AMPRAND 1
28 |
29 | class FxAmp : public Fx
30 | {
31 | public:
32 | FxAmp () = delete;
33 |
34 | FxAmp (RingBuffer** buffer, float* params, Pad* pads) :
35 | Fx (buffer, params, pads),
36 | amp (0.0f)
37 | {}
38 |
39 | virtual void init (const double position) override
40 | {
41 | Fx::init (position);
42 | const double r = bidist (rnd);
43 | amp = LIMIT (2.0 * (params[SLOTS_OPTPARAMS + FX_AMP_AMP] + r * params[SLOTS_OPTPARAMS + FX_AMP_AMPRAND]), 0.0, 2.0);
44 | }
45 |
46 | virtual Stereo process (const double position, const double size) override
47 | {
48 | return (**buffer).front() * amp;
49 | }
50 |
51 | protected:
52 | float amp;
53 |
54 | };
55 |
56 | #endif /* FXAMP_HPP_ */
57 |
--------------------------------------------------------------------------------
/src/FxBalance.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2020 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef FXBALANCE_HPP_
22 | #define FXBALANCE_HPP_
23 |
24 | #include "Fx.hpp"
25 |
26 | #define FX_BALANCE_BALANCE 0
27 | #define FX_BALANCE_BALANCERAND 1
28 |
29 |
30 |
31 | class FxBalance : public Fx
32 | {
33 | public:
34 | FxBalance () = delete;
35 |
36 | FxBalance (RingBuffer** buffer, float* params, Pad* pads) :
37 | Fx (buffer, params, pads),
38 | balance (0.0f)
39 | {}
40 |
41 | virtual void init (const double position) override
42 | {
43 | Fx::init (position);
44 | const double r = bidist (rnd);
45 | balance = LIMIT (2.0 * (params[SLOTS_OPTPARAMS + FX_BALANCE_BALANCE] + r * params[SLOTS_OPTPARAMS + FX_BALANCE_BALANCERAND]) - 1.0, -1.0, 1.0);
46 | }
47 |
48 | virtual Stereo process (const double position, const double size) override
49 | {
50 | const Stereo s0 = (**buffer).front();
51 | return Stereo
52 | {
53 | (balance < 0.0f ? s0.left + (0.0f - balance) * s0.right : (1.0f - balance) * s0.left),
54 | (balance < 0.0f ? (balance + 1.0f) * s0.right : s0.right + balance * s0.left)
55 | };
56 | }
57 |
58 | protected:
59 | float balance;
60 |
61 | };
62 |
63 | #endif /* FXBALANCE_HPP_ */
64 |
--------------------------------------------------------------------------------
/src/FxBitcrush.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2020 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef FXBITCRUSH_HPP_
22 | #define FXBITCRUSH_HPP_
23 |
24 | #include "Fx.hpp"
25 |
26 | #define FX_BITCRUSH_LIMIT 0
27 | #define FX_BITCRUSH_LIMITRAND 1
28 | #define FX_BITCRUSH_BIT 2
29 | #define FX_BITCRUSH_BITRAND 3
30 |
31 | class FxBitcrush : public Fx
32 | {
33 | public:
34 | FxBitcrush () = delete;
35 |
36 | FxBitcrush (RingBuffer** buffer, float* params, Pad* pads) :
37 | Fx (buffer, params, pads),
38 | limit (1.0), bit (16.0), f (65536) {}
39 |
40 | virtual void init (const double position) override
41 | {
42 | Fx::init (position);
43 | const double r1 = bidist (rnd);
44 | limit = LIMIT (0.01 + 1.99 * params[SLOTS_OPTPARAMS + FX_BITCRUSH_LIMIT] + 1.99 * r1 * params[SLOTS_OPTPARAMS + FX_BITCRUSH_LIMITRAND], 0.01, 2.0);
45 | const double r2 = bidist (rnd);
46 | bit = LIMIT (1.0 + 32.0 * (params[SLOTS_OPTPARAMS + FX_BITCRUSH_BIT] + r2 * params[SLOTS_OPTPARAMS + FX_BITCRUSH_BITRAND]), 1.0, 32.0);
47 | f = pow (2, bit - 1);
48 | }
49 |
50 | virtual Stereo process (const double position, const double size) override
51 | {
52 | const Stereo s0 = (**buffer).front();
53 | const float l1 = LIMIT (s0.left + limit, 0, 2.0 * limit) / (2.0 * limit);
54 | const float l2 = round (l1 * f);
55 | const float l3 = (l2 - 0.5 * f) * 2.0 * limit / f;
56 | const float r1 = LIMIT (s0.right + limit, 0, 2.0 * limit) / (2.0 * limit);
57 | const float r2 = round (r1 * f);
58 | const float r3 = (r2 - 0.5 * f) * 2.0 * limit / f;
59 |
60 | return Stereo (l3, r3);
61 | }
62 |
63 | protected:
64 | float limit;
65 | int bit;
66 | float f;
67 | };
68 |
69 | #endif /* FXBITCRUSH_HPP_ */
70 |
--------------------------------------------------------------------------------
/src/FxDecimate.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2020 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef FXDECIMATE_HPP_
22 | #define FXDECIMATE_HPP_
23 |
24 | #include "Fx.hpp"
25 | #include
26 |
27 | #define FX_DECIMATE_DECIMATE 0
28 | #define FX_DECIMATE_DECIMATERAND 1
29 |
30 | class FxDecimate : public Fx
31 | {
32 | public:
33 | FxDecimate () = delete;
34 |
35 | FxDecimate (RingBuffer** buffer, float* params, Pad* pads) :
36 | Fx (buffer, params, pads),
37 | decimate (0.0f), stack {0.0, 0.0}, live {0.0, 0.0}, count (0)
38 | {}
39 |
40 | virtual void init (const double position) override
41 | {
42 | Fx::init (position);
43 | const double r = bidist (rnd);
44 | decimate = LIMIT (0.01 + 0.99 * (params[SLOTS_OPTPARAMS + FX_DECIMATE_DECIMATE] + r * params[SLOTS_OPTPARAMS + FX_DECIMATE_DECIMATERAND]), 0.01, 1.0);
45 | stack = Stereo {0.0, 0.0};
46 | live = Stereo {0.0, 0.0};
47 | count = 0;
48 | }
49 |
50 | virtual Stereo process (const double position, const double size) override
51 | {
52 | const Stereo s0 = (**buffer).front();
53 |
54 | if (count + 1.0 >= 1.0 / decimate)
55 | {
56 | double c0 = 1.0 / decimate - count;
57 | stack += s0 * c0;
58 | live = stack * decimate;
59 | count = 1.0 - c0;
60 | stack = s0 * count;
61 | }
62 |
63 | else
64 | {
65 | ++count;
66 | stack += s0;
67 | }
68 |
69 | return live;
70 | }
71 |
72 | protected:
73 | float decimate;
74 | Stereo stack;
75 | Stereo live;
76 | double count;
77 | };
78 |
79 | #endif /* FXDECIMATE_HPP_ */
80 |
--------------------------------------------------------------------------------
/src/FxEQ.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2020 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef FXEQ_HPP_
22 | #define FXEQ_HPP_
23 |
24 | #include "Fx.hpp"
25 | #include "BiquadPeakFilter.hpp"
26 |
27 | class FxEQ : public Fx
28 | {
29 | public:
30 | FxEQ () = delete;
31 |
32 | FxEQ (RingBuffer** buffer, float* params, Pad* pads, const double rate) :
33 | Fx (buffer, params, pads),
34 | rate (rate),
35 | gains {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}
36 |
37 | {
38 | for (int i = 0; i < 6; ++i) filters[i] = BiquadPeakFilter (rate);
39 | filters[0].set (30.0f, M_SQRT1_2, 0.0f); // Sub
40 | filters[1].set (80.0f, 1.0, 0.0f); // Boom
41 | filters[2].set (300.0f, M_SQRT1_2, 0.0f); // Warmth
42 | filters[3].set (1500.0f, 1.0, 0.0f); // Clarity
43 | filters[4].set (4000.0f, 1.0, 0.0f); // Presence
44 | filters[5].set (15000.0f, 1.0, 0.0f); // Air
45 | }
46 |
47 | virtual void init (const double position) override
48 | {
49 | Fx::init (position);
50 | for (int i = 0; i < 6; ++i)
51 | {
52 | const double r = bidist (rnd);
53 | gains[i] = 72.0f * LIMIT (params[SLOTS_OPTPARAMS + 2 * i] + r * params[SLOTS_OPTPARAMS + 2 * i + 1], 0.0f, 1.0f) - 36.0f;
54 | filters[i].setPeakGain (gains[i]);
55 | }
56 | }
57 |
58 | virtual Stereo process (const double position, const double size) override
59 | {
60 | Stereo s = (**buffer).front();
61 | for (int i = 0; i < 6; ++i) s = filters[i].process (s);
62 | return s;
63 | }
64 |
65 | protected:
66 | double rate;
67 | float gains[6];
68 | BiquadPeakFilter filters[6];
69 | };
70 |
71 | #endif /* FXEQ_HPP_ */
72 |
--------------------------------------------------------------------------------
/src/FxFilter.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2020 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef FXFILTER_HPP_
22 | #define FXFILTER_HPP_
23 |
24 | #include "Fx.hpp"
25 | #include "ButterworthBandPassFilter.hpp"
26 |
27 | #define FX_FILTER_LOW 0
28 | #define FX_FILTER_LOWRAND 1
29 | #define FX_FILTER_HIGH 2
30 | #define FX_FILTER_HIGHRAND 3
31 | #define FX_FILTER_ORDER 4
32 |
33 | class BOops; // Forward declaration
34 |
35 | class FxFilter : public Fx
36 | {
37 | public:
38 | FxFilter () = delete;
39 |
40 | FxFilter (RingBuffer** buffer, float* params, Pad* pads, double rate) :
41 | Fx (buffer, params, pads),
42 | rate (rate), filter (48000, 20, 20000, 8) {}
43 |
44 | virtual void init (const double position) override
45 | {
46 | Fx::init (position);
47 | const double r1 = bidist (rnd);
48 | double low = 20.0f + 19980.0f * pow (LIMIT (params[SLOTS_OPTPARAMS + FX_FILTER_LOW] + r1 * params[SLOTS_OPTPARAMS + FX_FILTER_LOWRAND], 0.0, 1.0), 4.0);
49 | const double r2 = bidist (rnd);
50 | double high = 20.0f + 19980.0f * pow (LIMIT (params[SLOTS_OPTPARAMS + FX_FILTER_HIGH] + r2 * params[SLOTS_OPTPARAMS + FX_FILTER_HIGHRAND], 0.0, 1.0), 4.0);
51 | int order = 2 * int (LIMIT (1.0 + 8.0 * params[SLOTS_OPTPARAMS + FX_FILTER_ORDER], 1.0, 8.0));
52 | filter = ButterworthBandPassFilter (rate, low, high, order);
53 | }
54 |
55 | virtual Stereo process (const double position, const double size) override
56 | {
57 | return filter.push ((**buffer).front());
58 | }
59 |
60 | protected:
61 | double rate;
62 | ButterworthBandPassFilter filter;
63 | };
64 |
65 | #endif /* FXFILTER_HPP_ */
66 |
--------------------------------------------------------------------------------
/src/FxNoise.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2020 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef FXNOISE_HPP_
22 | #define FXNOISE_HPP_
23 |
24 | #include "Fx.hpp"
25 |
26 | #ifndef DB2CO
27 | #define DB2CO(x) pow (10, 0.05 * (x))
28 | #endif
29 |
30 | #define FX_NOISE_AMP 0
31 | #define FX_NOISE_AMPRAND 1
32 |
33 | class FxNoise : public Fx
34 | {
35 | public:
36 | FxNoise () = delete;
37 |
38 | FxNoise (RingBuffer** buffer, float* params, Pad* pads) :
39 | Fx (buffer, params, pads),
40 | amp (0.0f)
41 | {}
42 |
43 | virtual void init (const double position) override
44 | {
45 | Fx::init (position);
46 | const double r = bidist (rnd);
47 | const float db = -90.0 + 102.0 * LIMIT (params[SLOTS_OPTPARAMS + FX_NOISE_AMP] + r * params[SLOTS_OPTPARAMS + FX_NOISE_AMPRAND], 0.0, 1.0);
48 | amp = DB2CO (db);
49 | }
50 |
51 | virtual Stereo process (const double position, const double size) override
52 | {
53 | return Stereo {unidist (rnd) * amp, unidist (rnd) * amp};
54 | }
55 |
56 | protected:
57 | float amp;
58 |
59 | };
60 |
61 | #endif /* FXNOISE_HPP_ */
62 |
--------------------------------------------------------------------------------
/src/FxReverb.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2020 - 2021 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef FXREVERB_HPP_
22 | #define FXREVERB_HPP_
23 |
24 | #include "Fx.hpp"
25 | #include "ACE/ACEReverb.hpp"
26 |
27 | #define FX_REVERB_SIZE 0
28 | #define FX_REVERB_SIZERAND 1
29 |
30 | class FxReverb : public Fx
31 | {
32 | public:
33 | FxReverb () = delete;
34 |
35 | FxReverb (RingBuffer** buffer, float* params, Pad* pads, double rate) :
36 | Fx (buffer, params, pads),
37 | reverb (rate, 0.75, powf (10.0f, .05f * -20.0f), -0.015f, 1.0f),
38 | rsize (0.5f)
39 | {}
40 |
41 | virtual void init (const double position) override
42 | {
43 | Fx::init (position);
44 | const double r1 = bidist (rnd);
45 | rsize = 0.5 + 0.5 * LIMIT (params[SLOTS_OPTPARAMS + FX_REVERB_SIZE] + r1 * params[SLOTS_OPTPARAMS + FX_REVERB_SIZERAND], 0.0, 1.0);
46 |
47 | reverb.setRoomSize (rsize);
48 | }
49 |
50 | virtual Stereo process (const double position, const double size) override
51 | {
52 | const Stereo s0 = (**buffer).front();
53 | Stereo s1 = Stereo();
54 | reverb.reverb (&s0.left, &s0.right, &s1.left, &s1.right, 1);
55 | return s1;
56 | }
57 |
58 | virtual Stereo playPad (const double position, const double size, const double mixf) override
59 | {
60 | const Stereo s0 = (**buffer).front();
61 | const Stereo s1 = process (position, size);
62 | return mix (s0, s1, position, size, mixf);
63 | }
64 |
65 | virtual Stereo play (const double position, const double size, const double mx, const double mixf) override
66 | {
67 | const Stereo s0 = (**buffer).front();
68 | const Stereo s1 = process (position, size);
69 | return BUtilities::mix (s0, pan (s0, s1), params[SLOTS_MIX] * mx * mixf);
70 | }
71 |
72 | protected:
73 | AceReverb reverb;
74 | float rsize;
75 |
76 | };
77 |
78 | #endif /* FXREVERB_HPP_ */
79 |
--------------------------------------------------------------------------------
/src/FxReverser.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2020 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef FXREVERSER_HPP_
22 | #define FXREVERSER_HPP_
23 |
24 | #include "Fx.hpp"
25 |
26 | class FxReverser : public Fx
27 | {
28 | public:
29 | FxReverser () = delete;
30 |
31 | FxReverser (RingBuffer** buffer, float* params, Pad* pads, double* framesPerStep) :
32 | Fx (buffer, params, pads),
33 | framesPerStepPtr (framesPerStep),
34 | framesPerStep (24000)
35 | {
36 | if (!framesPerStep) throw std::invalid_argument ("Fx initialized with framesPerStep nullptr");
37 | }
38 |
39 | virtual void init (const double position) override
40 | {
41 | Fx::init (position);
42 | framesPerStep = *framesPerStepPtr;
43 | }
44 |
45 | virtual Stereo process (const double position, const double size) override
46 | {
47 | size_t rpos = 2.0 * framesPerStep * std::min (position, double (NR_STEPS));
48 | return (**buffer)[rpos];
49 | }
50 |
51 | protected:
52 | double* framesPerStepPtr;
53 | double framesPerStep;
54 |
55 | };
56 |
57 | #endif /* FXREVERSER_HPP_ */
58 |
--------------------------------------------------------------------------------
/src/FxScratch.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2020 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef FXSCRATCH_HPP_
22 | #define FXSCRATCH_HPP_
23 |
24 | #include "Fx.hpp"
25 | #include "Shape.hpp"
26 |
27 | #define FX_SCRATCH_RANGE 0
28 | #define FX_SCRATCH_RANGERAND 1
29 | #define FX_SCRATCH_REACH 2
30 |
31 | class FxScratch : public Fx
32 | {
33 | public:
34 | FxScratch () = delete;
35 |
36 | FxScratch (RingBuffer** buffer, float* params, Pad* pads, double* framesPerStep, Shape* shape) :
37 | Fx (buffer, params, pads),
38 | framesPerStepPtr (framesPerStep),
39 | framesPerStep (24000),
40 | shape (shape),
41 | range (0.0), reach (1.0)
42 | {
43 | if (!framesPerStep) throw std::invalid_argument ("Fx initialized with framesPerStep nullptr");
44 | if (!shape) throw std::invalid_argument ("Fx initialized with shape nullptr");
45 | }
46 |
47 | virtual void init (const double position) override
48 | {
49 | Fx::init (position);
50 | framesPerStep = *framesPerStepPtr;
51 | const double r = bidist (rnd);
52 | range = LIMIT (params[SLOTS_OPTPARAMS + FX_SCRATCH_RANGE] + r * params[SLOTS_OPTPARAMS + FX_SCRATCH_RANGERAND], 0.0, 1.0);
53 | reach = 1.0 + LIMIT (32.0 * params [SLOTS_OPTPARAMS + FX_SCRATCH_REACH], 0, 31);
54 | }
55 |
56 | virtual Stereo process (const double position, const double size) override
57 | {
58 | const double f = shape->getMapValue (fmod (position / reach, 1.0));
59 | const double frame = framesPerStep * range * (-LIMIT (f, -1.0, 0.0));
60 | return getSample (frame);
61 | }
62 |
63 | protected:
64 | double* framesPerStepPtr;
65 | double framesPerStep;
66 | Shape* shape;
67 | double range;
68 | double reach;
69 | };
70 |
71 | #endif /* FXSCRATCH_HPP_ */
72 |
--------------------------------------------------------------------------------
/src/FxTapeSpeed.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2020 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef FXTAPESPEED_HPP_
22 | #define FXTAPESPEED_HPP_
23 |
24 | #include "Fx.hpp"
25 |
26 | #define FX_TAPESPEED_SPEED 0
27 | #define FX_TAPESPEED_SPEEDRAND 1
28 |
29 | class FxTapeSpeed : public Fx
30 | {
31 | public:
32 | FxTapeSpeed () = delete;
33 |
34 | FxTapeSpeed (RingBuffer** buffer, float* params, Pad* pads, double* framesPerStep) :
35 | Fx (buffer, params, pads),
36 | framesPerStepPtr (framesPerStep),
37 | framesPerStep (24000),
38 | speed (1.0)
39 | {
40 | if (!framesPerStep) throw std::invalid_argument ("Fx initialized with framesPerStep nullptr");
41 | }
42 |
43 | virtual void init (const double position) override
44 | {
45 | Fx::init (position);
46 | const double r = bidist (rnd);
47 | speed = LIMIT (params[SLOTS_OPTPARAMS + FX_TAPESPEED_SPEED] + r * params[SLOTS_OPTPARAMS + FX_TAPESPEED_SPEEDRAND], 0.0, 1.0);
48 | framesPerStep = *framesPerStepPtr;
49 | }
50 |
51 | virtual Stereo process (const double position, const double size) override
52 | {
53 | return getSample ((1.0 - speed) * framesPerStep * std::min (position, double (NR_STEPS)));
54 | }
55 |
56 | protected:
57 | double* framesPerStepPtr;
58 | double framesPerStep;
59 | double speed;
60 | };
61 |
62 | #endif /* FXTAPESPEED_HPP_ */
63 |
--------------------------------------------------------------------------------
/src/FxTapeStop.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2020 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef FXTAPESTOP_HPP_
22 | #define FXTAPESTOP_HPP_
23 |
24 | #include "Fx.hpp"
25 |
26 | #define FX_TAPESTOP_REACH 0
27 | #define FX_TAPESTOP_REACHRAND 1
28 | #define FX_TAPESTOP_ORDER 2
29 | #define FX_TAPESTOP_ORDERRAND 3
30 |
31 | class FxTapeStop : public Fx
32 | {
33 | public:
34 | FxTapeStop () = delete;
35 |
36 | FxTapeStop (RingBuffer** buffer, float* params, Pad* pads, double* framesPerStep) :
37 | Fx (buffer, params, pads),
38 | framesPerStepPtr (framesPerStep),
39 | framesPerStep (24000),
40 | reach (1.0), order (1.0), r (0.0)
41 | {
42 | if (!framesPerStep) throw std::invalid_argument ("Fx initialized with framesPerStep nullptr");
43 | }
44 |
45 | virtual void init (const double position) override
46 | {
47 | Fx::init (position);
48 | const double r1 = bidist (rnd);
49 | reach = LIMIT (params[SLOTS_OPTPARAMS + FX_TAPESTOP_REACH] + r1 * params[SLOTS_OPTPARAMS + FX_TAPESTOP_REACHRAND], 0.0, 1.0);
50 | const int startPos = position;
51 | r = reach * pads[startPos].size;
52 | const double r2 = bidist (rnd);
53 | order = LIMIT (1.0 + 9.0 * (params[SLOTS_OPTPARAMS + FX_TAPESTOP_ORDER] + r2 * params[SLOTS_OPTPARAMS + FX_TAPESTOP_ORDERRAND]), 1.0, 10.0);
54 | framesPerStep = *framesPerStepPtr;
55 | }
56 |
57 | virtual Stereo process (const double position, const double size) override
58 | {
59 | return getSample ((log (exp (order * std::min (position, double (NR_STEPS))) + exp (order * reach) - 1) / order - reach) * framesPerStep);
60 | }
61 |
62 | protected:
63 | double* framesPerStepPtr;
64 | double framesPerStep;
65 | double reach;
66 | double order;
67 | double r;
68 | };
69 |
70 | #endif /* FXTAPESTOP_HPP_ */
71 |
--------------------------------------------------------------------------------
/src/FxWidth.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2020 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef FXWIDTH_HPP_
22 | #define FXWIDTH_HPP_
23 |
24 | #include "Fx.hpp"
25 |
26 | #define FX_WIDTH_WIDTH 0
27 | #define FX_WIDTH_WIDTHRAND 1
28 |
29 | class FxWidth : public Fx
30 | {
31 | public:
32 | FxWidth () = delete;
33 |
34 | FxWidth (RingBuffer** buffer, float* params, Pad* pads) :
35 | Fx (buffer, params, pads),
36 | width (0.0f)
37 | {}
38 |
39 | virtual void init (const double position) override
40 | {
41 | Fx::init (position);
42 | const double r = bidist (rnd);
43 | width =pow (2 * LIMIT (params[SLOTS_OPTPARAMS + FX_WIDTH_WIDTH] + r * params[SLOTS_OPTPARAMS + FX_WIDTH_WIDTHRAND], 0.0, 1.0), 6.64385619);
44 | }
45 |
46 | virtual Stereo process (const double position, const double size) override
47 | {
48 | const Stereo s0 = (**buffer).front();
49 | const float m = (s0.left + s0.right) / 2;
50 | const float x = (s0.left - s0.right) * width / 2;
51 | return Stereo {m + x, m - x};
52 | }
53 |
54 | protected:
55 | float width;
56 |
57 | };
58 |
59 | #endif /* FXWIDTH_HPP_ */
60 |
--------------------------------------------------------------------------------
/src/HaloToggleButton.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2019 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef HALOTOGGLEBUTTON_HPP_
22 | #define HALOTOGGLEBUTTON_HPP_
23 |
24 | #include "HaloButton.hpp"
25 |
26 | class HaloToggleButton : public HaloButton
27 | {
28 | public:
29 | HaloToggleButton () : HaloToggleButton (0, 0, 0, 0, "editwidget", "") {}
30 |
31 | HaloToggleButton (const double x, const double y, const double width, const double height, const std::string& name, const std::string& focusText) :
32 | HaloButton (x, y, width, height, name, focusText) {}
33 |
34 | virtual BWidgets::Widget* clone () const override {return new HaloToggleButton (*this);}
35 |
36 | virtual void onButtonPressed (BEvents::PointerEvent* event) override
37 | {
38 | setValue (getValue() == 1.0 ? 0.0 : 1.0);
39 | Widget::cbfunction_[BEvents::EventType::BUTTON_PRESS_EVENT] (event);
40 | }
41 |
42 | virtual void onButtonReleased (BEvents::PointerEvent* event) override
43 | {
44 | Widget::cbfunction_[BEvents::EventType::BUTTON_RELEASE_EVENT] (event);
45 | }
46 | };
47 |
48 | #endif /* HALOTOGGLEBUTTON_HPP_ */
49 |
--------------------------------------------------------------------------------
/src/Limit.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2020 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef LIMIT_HPP_
22 | #define LIMIT_HPP_
23 |
24 | #include
25 |
26 | struct Limit
27 | {
28 | float min;
29 | float max;
30 | float step;
31 |
32 | float validate (float value) const
33 | {
34 | if (max <= min) return min;
35 | if (value <= min) return min;
36 | if (value >= max) return max;
37 | if (step == 0) return value;
38 | float newValue = (step > 0 ? min + round ((value - min) / step) * step : max - round ((max - value) / step) * step);
39 | return (newValue >= min ? (newValue <= max ? newValue : max) : min);
40 | }
41 | };
42 |
43 | #endif /* LIMIT_HPP_ */
44 |
--------------------------------------------------------------------------------
/src/Message.cpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2020 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #include "Message.hpp"
22 |
23 | Message::Message () : messageBits (0), scheduled (true) {}
24 |
25 | void Message::clearMessages ()
26 | {
27 | messageBits = 0;
28 | scheduled = true;
29 | }
30 |
31 | void Message::setMessage (MessageNr messageNr)
32 | {
33 | if ((messageNr > NO_MSG) && (messageNr <= MAX_MSG) && (!isMessage (messageNr)))
34 | {
35 | messageBits = messageBits | (1 << (messageNr - 1));
36 | scheduled = true;
37 | }
38 | }
39 |
40 | void Message::deleteMessage (MessageNr messageNr)
41 | {
42 | if ((messageNr > NO_MSG) && (messageNr <= MAX_MSG) && (isMessage (messageNr)))
43 | {
44 | messageBits = messageBits & (~(1 << (messageNr - 1)));
45 | scheduled = true;
46 | }
47 | }
48 |
49 | bool Message::isMessage (MessageNr messageNr)
50 | {
51 | if ((messageNr > NO_MSG) && (messageNr <= MAX_MSG)) return ((messageBits & (1 << (messageNr - 1))) != 0);
52 | else if (messageNr == NO_MSG) return (messageBits == 0);
53 | else return false;
54 | }
55 |
56 | MessageNr Message::loadMessage ()
57 | {
58 | scheduled = false;
59 | for (int i = NO_MSG + 1; i <= MAX_MSG; ++i)
60 | {
61 | MessageNr messageNr = MessageNr (i);
62 | if (isMessage (messageNr)) return messageNr;
63 | }
64 | return NO_MSG;
65 | }
66 |
67 | bool Message::isScheduled () {return scheduled;}
68 |
--------------------------------------------------------------------------------
/src/Message.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2020 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef MESSAGE_HPP_
22 | #define MESSAGE_HPP_
23 |
24 | #include
25 | #include "MessageDefinitions.hpp"
26 |
27 | class Message
28 | {
29 | public:
30 | Message ();
31 | void clearMessages ();
32 | void setMessage (MessageNr messageNr);
33 | void deleteMessage (MessageNr messageNr);
34 | bool isMessage (MessageNr messageNr);
35 | MessageNr loadMessage ();
36 | bool isScheduled ();
37 | private:
38 | uint32_t messageBits;
39 | bool scheduled;
40 | };
41 |
42 | #endif /* MESSAGE_HPP_*/
43 |
--------------------------------------------------------------------------------
/src/MessageDefinitions.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2020 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef MESSAGEDEFINITIONS_HPP_
22 | #define MESSAGEDEFINITIONS_HPP_
23 |
24 | #include
25 | #include
26 |
27 | #ifdef LOCALEFILE
28 | #include LOCALEFILE
29 | #else
30 | #include "Locale_EN.hpp"
31 | #endif
32 |
33 | enum MessageNr
34 | {
35 | NO_MSG = 0,
36 | JACK_STOP_MSG = 1,
37 | CANT_OPEN_SAMPLE = 2,
38 | OTHER_MSG = 3,
39 | MAX_MSG = 3
40 | };
41 |
42 | const std::array messageStrings =
43 | {{
44 | "",
45 | BOOPS_LABEL_JACK_OFF,
46 | BOOPS_LABEL_CANT_OPEN_SAMPLE,
47 | BOOPS_LABEL_MSG
48 | }};
49 |
50 | #endif /* MESSAGEDEFINITIONS_HPP_*/
51 |
--------------------------------------------------------------------------------
/src/MidiKey.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2020 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef MIDIKEY_HPP_
22 | #define MIDIKEY_HPP_
23 |
24 | #include
25 |
26 | struct MidiKey
27 | {
28 | uint8_t status;
29 | uint8_t channel;
30 | uint8_t note;
31 | uint8_t velocity;
32 | double count;
33 | double value;
34 | };
35 |
36 | #endif /* MIDIKEY_HPP_ */
--------------------------------------------------------------------------------
/src/Node.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 219, 2020 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef NODE_HPP_
22 | #define NODE_HPP_
23 |
24 | #include "BUtilities/Point.hpp"
25 | // #include
26 |
27 | enum NodeType
28 | {
29 | END_NODE = 0, // End positions, only point data are used
30 | POINT_NODE = 1, // Only point data are used
31 | AUTO_SMOOTH_NODE = 2, // Uses two handles, both are calculated automatically
32 | SYMMETRIC_SMOOTH_NODE = 3, // Uses two handles, the second handle is set to be symmetric to the first one
33 | SMOOTH_NODE = 4, // Uses two handles, the second handle points to the opposite direction of the first one
34 | CORNER_NODE = 5 // Uses two independent handles
35 | };
36 |
37 | struct Node
38 | {
39 | NodeType nodeType;
40 | BUtilities::Point point;
41 | BUtilities::Point handle1;
42 | BUtilities::Point handle2;
43 |
44 | Node () : Node (END_NODE, {0, 0}, {0, 0}, {0,0}) {}
45 | Node (NodeType nodeType, BUtilities::Point point, BUtilities::Point handle1, BUtilities::Point handle2) :
46 | nodeType (nodeType), point (point), handle1 (handle1), handle2 (handle2) {}
47 | Node (float* data) : nodeType ((NodeType) data[0]), point ({data[1], data[2]}), handle1 ({data[3], data[4]}), handle2 ({data[5], data[6]}) {}
48 |
49 | friend bool operator== (const Node& lhs, const Node& rhs)
50 | {return ((lhs.nodeType == rhs.nodeType) && (lhs.point == rhs.point) && (lhs.handle1 == rhs.handle1) && (lhs.handle2 == rhs.handle2));}
51 | friend bool operator!= (const Node& lhs, const Node& rhs) {return !(lhs == rhs);}
52 | };
53 |
54 | /*
55 | std::ostream &operator<<(std::ostream &output, Node& node)
56 | {
57 | output << "{" << int (node.nodeType) << ", " << node.point << ", " << node.handle1 << ", " << node.handle2 << "}";
58 | return output;
59 | }
60 | */
61 | #endif /* NODE_HPP_ */
62 |
--------------------------------------------------------------------------------
/src/Pad.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2020 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef PAD_HPP_
22 | #define PAD_HPP_
23 |
24 | struct Pad
25 | {
26 | Pad () : Pad (0, 0, 0) {}
27 |
28 | Pad (float gate, float size, float mix) :
29 | gate (gate), size (size), mix (mix)
30 | {}
31 |
32 | bool operator== (const Pad& that) const
33 | {
34 | return ((gate == that.gate) && (size == that.size) && (mix == that.mix));
35 | }
36 |
37 | bool operator!= (const Pad& that) const {return (!operator== (that));}
38 |
39 | float gate;
40 | float size;
41 | float mix;
42 | };
43 |
44 | #endif /* PAD_HPP_ */
45 |
--------------------------------------------------------------------------------
/src/PadMessage.hpp:
--------------------------------------------------------------------------------
1 | #ifndef PADMESSAGE_HPP_
2 | #define PADMESSAGE_HPP_
3 |
4 | #include "Pad.hpp"
5 |
6 | #define ENDPADMESSAGE -1.0, 0.0, Pad()
7 |
8 | struct PadMessage : Pad
9 | {
10 | PadMessage () : PadMessage (ENDPADMESSAGE) {}
11 | PadMessage (float row, float step, Pad pad) :
12 | Pad (pad), row (row), step (step) {}
13 | bool operator== (PadMessage& that) {return (Pad::operator== (that) && (step == that.step) && (row == that.row));}
14 |
15 | float row;
16 | float step;
17 | };
18 |
19 |
20 |
21 | #endif /* PADMESSAGE_HPP_ */
22 |
--------------------------------------------------------------------------------
/src/PadToggleButton.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2020 by Sven Jähnichen
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program. If not, see .
18 | */
19 |
20 | #ifndef PADTOGGLEBUTTON_HPP_
21 | #define PADTOGGLEBUTTON_HPP_
22 |
23 | #include "PadButton.hpp"
24 |
25 | class PadToggleButton : public PadButton
26 | {
27 | public:
28 | PadToggleButton () : PadToggleButton (0.0, 0.0, BWIDGETS_DEFAULT_BUTTON_WIDTH, BWIDGETS_DEFAULT_BUTTON_HEIGHT, "padbutton", NOSYMBOL, 0.0) {}
29 | PadToggleButton (const double x, const double y, const double width, const double height, const std::string& name, SymbolIndex symbol = NOSYMBOL, double defaultValue = 0.0) :
30 | PadButton (x, y, width, height, name, symbol, defaultValue)
31 | {}
32 |
33 | virtual Widget* clone () const override {return new PadToggleButton (*this);}
34 |
35 | void onButtonPressed (BEvents::PointerEvent* event)
36 | {
37 | if (getValue ()) setValue (0.0);
38 | else setValue (1.0);
39 |
40 | Widget::cbfunction_[BEvents::EventType::BUTTON_PRESS_EVENT] (event);
41 | }
42 |
43 | void onButtonReleased (BEvents::PointerEvent* event)
44 | {
45 | Widget::cbfunction_[BEvents::EventType::BUTTON_RELEASE_EVENT] (event);
46 | }
47 |
48 | protected:
49 | virtual BColors::Color getPadColor () override
50 | {
51 | BColors::Color butColor = *fgColors.getColor (getState ());
52 | butColor.applyBrightness (getValue() ? BWIDGETS_DEFAULT_NORMALLIGHTED : BWIDGETS_DEFAULT_SHADOWED);
53 | return butColor;
54 | }
55 |
56 | virtual BColors::Color getSymbolColor () override
57 | {
58 | BColors::Color symColor = *txColors.getColor (getState ());
59 | symColor.applyBrightness (getValue() ? BWIDGETS_DEFAULT_NORMALLIGHTED : BWIDGETS_DEFAULT_SHADOWED);
60 | return symColor;
61 | }
62 | };
63 |
64 | #endif /* PADTOGGLEBUTTON_HPP_ */
65 |
--------------------------------------------------------------------------------
/src/Range.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2019 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef RANGE_HPP_
22 | #define RANGE_HPP_
23 |
24 | struct Range
25 | {
26 | float min;
27 | float max;
28 | };
29 |
30 | #endif /* RANGE_HPP_ */
31 |
--------------------------------------------------------------------------------
/src/SelectWidget.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2019 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef SELECTWIDGET_HPP_
22 | #define SELECTWIDGET_HPP_
23 |
24 | #include "BWidgets/RangeWidget.hpp"
25 | #include "BWidgets/Focusable.hpp"
26 | #include "BWidgets/Label.hpp"
27 |
28 | class SelectWidget : public BWidgets::RangeWidget, public BWidgets::Focusable
29 | {
30 | public:
31 | SelectWidget ();
32 | SelectWidget (const double x, const double y, const double width, const double height, const std::string& name,
33 | const double selectionWidth, const double selectionHeight, const double nrTools, const double value,
34 | std::vector labeltexts = {});
35 | SelectWidget (const SelectWidget& that);
36 |
37 | SelectWidget& operator= (const SelectWidget& that);
38 |
39 | void resizeSelection (const double width, const double height);
40 | virtual void applyTheme (BStyles::Theme& theme) override;
41 | virtual void applyTheme (BStyles::Theme& theme, const std::string& name) override;
42 | virtual void onButtonPressed (BEvents::PointerEvent* event) override;
43 | virtual void onFocusIn (BEvents::FocusEvent* event) override;
44 | virtual void onFocusOut (BEvents::FocusEvent* event) override;
45 |
46 | protected:
47 | virtual void draw (const BUtilities::RectArea& area) override;
48 |
49 | BColors::ColorSet bgColors;
50 | int nrTools;
51 | double selectionWidth;
52 | double selectionHeight;
53 | std::vector labelTexts_;
54 | BWidgets::Label focusLabel_;
55 | };
56 |
57 | #endif /* SELECTWIDGET_HPP_ */
58 |
--------------------------------------------------------------------------------
/src/Snapshots.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2019 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef SNAPSHOTS_HPP_
22 | #define SNAPSHOTS_HPP_
23 |
24 | #include
25 | #include
26 | #include
27 |
28 | template
29 | class Snapshots
30 | {
31 | protected:
32 | std::array store;
33 | size_t pos = 0;
34 | size_t horizon = 0;
35 | size_t size = 0;
36 |
37 | public:
38 | void clear ()
39 | {
40 | store.fill (T());
41 | pos = 0;
42 | horizon = 0;
43 | size = 0;
44 | }
45 | void push (T& value)
46 | {
47 | horizon = ((pos + 1) % sz);
48 | store[horizon] = value;
49 | pos = horizon;
50 | size = (size < sz ? size + 1 : sz);
51 | }
52 |
53 | T undo ()
54 | {
55 | pos = (size == 0 ? 0 : (((size < sz) && (pos == 0)) ? 0 : ((horizon == ((pos + sz - 1) % sz)) ? pos : ((pos + sz - 1) % sz))));
56 | return store[pos];
57 | }
58 |
59 | T redo ()
60 | {
61 | pos = (size == 0 ? 0 : ((horizon == pos) ? pos : ((pos + 1) % sz)));
62 | return store[pos];
63 | }
64 | };
65 |
66 |
67 | #endif /* SNAPSHOTS_HPP_ */
68 |
--------------------------------------------------------------------------------
/src/UpClick.cpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2020 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #include "UpClick.hpp"
22 |
23 | UpClick::UpClick () : UpClick (0.0, 0.0, BWIDGETS_DEFAULT_BUTTON_WIDTH, BWIDGETS_DEFAULT_BUTTON_HEIGHT, "button", 0.0) {}
24 |
25 | UpClick::UpClick (const double x, const double y, const double width, const double height, const std::string& name, double defaultValue) :
26 | Button (x, y, width, height, name, defaultValue) {}
27 |
28 | void UpClick::draw (const BUtilities::RectArea& area)
29 | {
30 | if ((!widgetSurface_) || (cairo_surface_status (widgetSurface_) != CAIRO_STATUS_SUCCESS)) return;
31 |
32 | if ((area.getWidth() >= 6) && (area.getHeight() >= 6))
33 | {
34 | // Draw super class widget elements first
35 | Widget::draw (area);
36 |
37 | cairo_t* cr = cairo_create (widgetSurface_);
38 | if (cairo_status (cr) == CAIRO_STATUS_SUCCESS)
39 | {
40 | // Limit cairo-drawing area
41 | cairo_rectangle (cr, area.getX(), area.getY(), area.getWidth(), area.getHeight());
42 | cairo_clip (cr);
43 |
44 | double x0 = getXOffset ();
45 | double y0 = getYOffset ();
46 | double w = getEffectiveWidth ();
47 | double h = getEffectiveHeight ();
48 | BColors::Color butColor = *bgColors.getColor (value == 1 ? BColors::ACTIVE : BColors::NORMAL);
49 |
50 | cairo_move_to (cr, x0, y0 + 0.75 * h);
51 | cairo_line_to (cr, x0 + 0.5 * w, y0 + 0.25 * h);
52 | cairo_line_to (cr, x0 + w, y0 + 0.75 * h);
53 |
54 | cairo_set_line_width (cr, 2);
55 | cairo_set_source_rgba (cr, CAIRO_RGBA (butColor));
56 | cairo_stroke (cr);
57 |
58 | cairo_destroy (cr);
59 | }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/src/UpClick.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2020 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef UPCLICK_HPP_
22 | #define UPCLICK_HPP_
23 |
24 | #include "BWidgets/Button.hpp"
25 |
26 | class UpClick : public BWidgets::Button
27 | {
28 | public:
29 | UpClick ();
30 | UpClick (const double x, const double y, const double width, const double height, const std::string& name, double defaultValue = 0);
31 |
32 | virtual void draw (const BUtilities::RectArea& area) override;
33 | };
34 |
35 | #endif /* UPCLICK_HPP_ */
36 |
--------------------------------------------------------------------------------
/src/ValueSelect.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2019 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef VALUESELECT_HPP_
22 | #define VALUESELECT_HPP_
23 |
24 | #include "BWidgets/RangeWidget.hpp"
25 | #include "BWidgets/Label.hpp"
26 | #include "UpClick.hpp"
27 | #include "DownClick.hpp"
28 |
29 | class ValueSelect : public BWidgets::RangeWidget
30 | {
31 | public:
32 | ValueSelect ();
33 | ValueSelect (const double x, const double y, const double width, const double height, const std::string& name,
34 | const double value, const double min, const double max, const double step);
35 |
36 | virtual void applyTheme (BStyles::Theme& theme) override;
37 | virtual void applyTheme (BStyles::Theme& theme, const std::string& name) override;
38 | virtual void update () override;
39 | virtual void onPointerDragged (BEvents::PointerEvent* event) override;
40 | virtual void onWheelScrolled (BEvents::WheelEvent* event) override;
41 |
42 | protected:
43 | static void buttonPressedCallback (BEvents::Event* event);
44 | static void displayDraggedCallback (BEvents::Event* event);
45 | static void displayMessageCallback (BEvents::Event* event);
46 |
47 | UpClick upClick;
48 | DownClick downClick;
49 | BWidgets::Label display;
50 | };
51 |
52 | #endif /* VALUESELECT_HPP_ */
53 |
--------------------------------------------------------------------------------
/src/bool2hstr.hpp:
--------------------------------------------------------------------------------
1 | /* B.Oops
2 | * Glitch effect sequencer LV2 plugin
3 | *
4 | * Copyright (C) 2020 by Sven Jähnichen
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 3, or (at your option)
9 | * any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software Foundation,
18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef BOOL2HSTR_HPP_
22 | #define BOOL2HSTR_HPP_
23 |
24 | #include
25 | #include
26 | #include
27 |
28 | template void bool2hstr (const T& bools, char* dest, size_t sz = std::string::npos)
29 | {
30 | // TODO optimize algorithm
31 | const char* hexstr = "0123456789ABCDEF";
32 | if (sz == std::string::npos) sz = bools.size();
33 | dest[0] = 0;
34 | for (size_t i = 0; i * 4 < sz; ++i)
35 | {
36 | uint8_t quad = 0;
37 | for (size_t j = 0; (j < 4) && (j + 4 * i < sz); ++j) quad += bools[j + 4 * i] * (1 << j);
38 | memmove (dest + 1, dest, i + 1);
39 | dest[0] = hexstr[quad];
40 | }
41 | }
42 |
43 | template void hstr2bool (const char* source, T& bools)
44 | {
45 | // TODO optimize algorithm
46 | const char* hexstr = "0123456789ABCDEF";
47 | const size_t sz = strlen (source);
48 | for (size_t i = 0; i < sz; ++i)
49 | {
50 | const size_t pos = sz - i - 1;
51 | const char* iptr = strchr (hexstr, source[pos]);
52 | if (!iptr)
53 | {
54 | for (size_t j = 0; (j < 4) && (4 * i + j < bools.size()); ++j) bools[4 * i + j] = false;
55 | }
56 |
57 | else
58 | {
59 | const size_t quad = iptr - hexstr;
60 | for (size_t j = 0; (j < 4) && (4 * i + j < bools.size()); ++j) bools[4 * i + j] = bool (quad & (1 << j));
61 | }
62 | }
63 | }
64 |
65 | #endif /* BOOL2HSTR_HPP_ */
--------------------------------------------------------------------------------
/src/drawbutton.hpp:
--------------------------------------------------------------------------------
1 | #ifndef DRAWBUTTON_HPP_
2 | #define DRAWBUTTON_HPP_
3 |
4 | #include "BWidgets/cairoplus.h"
5 | #include "BWidgets/BColors.hpp"
6 | #include
7 |
8 | void drawButton (cairo_t* cr, double x, double y, double width, double height, BColors::Color color)
9 | {
10 | if ((width <= 0) || (height <= 0)) return;
11 |
12 | // Draw button
13 | BColors::Color illuminated = color; illuminated.applyBrightness (0.05);
14 | BColors::Color darkened = color; darkened.applyBrightness (-0.33);
15 | cairo_pattern_t* pat = cairo_pattern_create_radial (x + width / 2, y + height / 2, 0.125 * width, x + width / 2, y + height / 2, 0.5 * width);
16 |
17 | cairo_pattern_add_color_stop_rgba (pat, 0.0, CAIRO_RGBA (illuminated));
18 | cairo_pattern_add_color_stop_rgba (pat, 1.0, CAIRO_RGBA (darkened));
19 |
20 | double rad = ((width < 20) || (height < 20) ? (width < height ? width : height) / 4 : 5);
21 | cairo_rectangle_rounded (cr, x, y, width, height, rad, 0b1111);
22 | cairo_set_source (cr, pat);
23 | cairo_fill (cr);
24 | cairo_pattern_destroy (pat);
25 | }
26 |
27 | void drawButton (cairo_surface_t* surface, double x, double y, double width, double height, BColors::Color color)
28 | {
29 | cairo_t* cr = cairo_create (surface);
30 | drawButton (cr, x, y, width, height, color);
31 | cairo_destroy (cr);
32 | }
33 |
34 | #endif /* DRAWBUTTON_HPP_ */
35 |
--------------------------------------------------------------------------------
/src/screen.c:
--------------------------------------------------------------------------------
1 | #include "screen.h"
2 | #include
3 |
4 | int getScreenWidth ()
5 | {
6 | Display* display = XOpenDisplay(NULL);
7 | Screen* screen = DefaultScreenOfDisplay(display);
8 | return screen->width;
9 | }
10 |
11 | int getScreenHeight ()
12 | {
13 | Display* display = XOpenDisplay(NULL);
14 | Screen* screen = DefaultScreenOfDisplay(display);
15 | return screen->height;
16 | }
17 |
--------------------------------------------------------------------------------
/src/screen.h:
--------------------------------------------------------------------------------
1 | #ifndef SCREEN_H_
2 | #define SCREEN_H_
3 |
4 | #ifdef __cplusplus
5 | extern "C" {
6 | #endif /* __cplusplus */
7 |
8 | int getScreenWidth ();
9 | int getScreenHeight ();
10 |
11 | #ifdef __cplusplus
12 | }
13 | #endif /* __cplusplus */
14 |
15 | #endif /* SCREEN_H_ */
16 |
--------------------------------------------------------------------------------