id
int64
0
755k
file_name
stringlengths
3
109
file_path
stringlengths
13
185
content
stringlengths
31
9.38M
size
int64
31
9.38M
language
stringclasses
1 value
extension
stringclasses
11 values
total_lines
int64
1
340k
avg_line_length
float64
2.18
149k
max_line_length
int64
7
2.22M
alphanum_fraction
float64
0
1
repo_name
stringlengths
6
65
repo_stars
int64
100
47.3k
repo_forks
int64
0
12k
repo_open_issues
int64
0
3.4k
repo_license
stringclasses
9 values
repo_extraction_date
stringclasses
92 values
exact_duplicates_redpajama
bool
2 classes
near_duplicates_redpajama
bool
2 classes
exact_duplicates_githubcode
bool
2 classes
exact_duplicates_stackv2
bool
1 class
exact_duplicates_stackv1
bool
2 classes
near_duplicates_githubcode
bool
2 classes
near_duplicates_stackv1
bool
2 classes
near_duplicates_stackv2
bool
1 class
20,049
BitcrushControlDialog.h
LMMS_lmms/plugins/Bitcrush/BitcrushControlDialog.h
/* * BitcrushControlDialog.h - A native bitcrusher * * Copyright (c) 2014 Vesa Kivim√§ki <contact/dot/diizy/at/nbl/dot/fi> * Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef BITCRUSH_CONTROL_DIALOG_H #define BITCRUSH_CONTROL_DIALOG_H #include "EffectControlDialog.h" namespace lmms { class BitcrushControls; namespace gui { class BitcrushControlDialog : public EffectControlDialog { Q_OBJECT public: BitcrushControlDialog( BitcrushControls * controls ); ~BitcrushControlDialog() override = default; }; } // namespace gui } // namespace lmms #endif
1,395
C++
.h
42
31.309524
77
0.773304
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,050
BitcrushControls.h
LMMS_lmms/plugins/Bitcrush/BitcrushControls.h
/* * BitcrushControls.h - A native bitcrusher * * Copyright (c) 2014 Vesa Kivim√§ki <contact/dot/diizy/at/nbl/dot/fi> * Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef BITCRUSH_CONTROLS_H #define BITCRUSH_CONTROLS_H #include "EffectControls.h" #include "BitcrushControlDialog.h" namespace lmms { class BitcrushEffect; class BitcrushControls : public EffectControls { Q_OBJECT public: BitcrushControls( BitcrushEffect * eff ); ~BitcrushControls() override = default; void saveSettings( QDomDocument & doc, QDomElement & elem ) override; void loadSettings( const QDomElement & elem ) override; inline QString nodeName() const override { return( "bitcrushcontrols" ); } int controlCount() override { return( 9 ); } gui::EffectControlDialog * createView() override { return( new gui::BitcrushControlDialog( this ) ); } private slots: void sampleRateChanged(); private: BitcrushEffect * m_effect; FloatModel m_inGain; FloatModel m_inNoise; FloatModel m_outGain; FloatModel m_outClip; FloatModel m_rate; FloatModel m_stereoDiff; FloatModel m_levels; BoolModel m_rateEnabled; BoolModel m_depthEnabled; friend class gui::BitcrushControlDialog; friend class BitcrushEffect; }; } // namespace lmms #endif
2,087
C++
.h
69
28.057971
77
0.774096
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,051
Watsyn.h
LMMS_lmms/plugins/Watsyn/Watsyn.h
/* * Watsyn.h - a 4-oscillator modulating wavetable synth * * Copyright (c) 2014 Vesa Kivim√§ki <contact/dot/diizy/at/nbl/dot/fi> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef WATSYN_H #define WATSYN_H #include "Instrument.h" #include "InstrumentView.h" #include "Graph.h" #include "AutomatableModel.h" #include "TempoSyncKnob.h" #include <samplerate.h> namespace lmms { #define makeknob( name, x, y, hint, unit, oname ) \ name = new Knob( KnobType::Styled, this ); \ name ->move( x, y ); \ name ->setHintText( hint, unit ); \ name ->setObjectName( oname ); \ name ->setFixedSize( 19, 19 ); #define maketsknob( name, x, y, hint, unit, oname ) \ name = new TempoSyncKnob( KnobType::Styled, this ); \ name ->move( x, y ); \ name ->setHintText( hint, unit ); \ name ->setObjectName( oname ); \ name ->setFixedSize( 19, 19 ); #define A1ROW 26 #define A2ROW 49 #define B1ROW 72 #define B2ROW 95 const int GRAPHLEN = 220; // don't change - must be same as the size of the widget const int WAVERATIO = 32; // oversampling ratio const int WAVELEN = GRAPHLEN * WAVERATIO; const int PMOD_AMT = WAVELEN / 2; const int MOD_MIX = 0; const int MOD_AM = 1; const int MOD_RM = 2; const int MOD_PM = 3; const int NUM_MODS = 4; const int A1_OSC = 0; const int A2_OSC = 1; const int B1_OSC = 2; const int B2_OSC = 3; const int NUM_OSCS = 4; class WatsynInstrument; namespace gui { class automatableButtonGroup; class PixmapButton; class WatsynView; } class WatsynObject { public: WatsynObject( float * _A1wave, float * _A2wave, float * _B1wave, float * _B2wave, int _amod, int _bmod, const sample_rate_t _samplerate, NotePlayHandle * _nph, fpp_t _frames, WatsynInstrument * _w ); virtual ~WatsynObject(); void renderOutput( fpp_t _frames ); inline SampleFrame* abuf() const { return m_abuf; } inline SampleFrame* bbuf() const { return m_bbuf; } inline sample_rate_t samplerate() const { return m_samplerate; } private: int m_amod; int m_bmod; const sample_rate_t m_samplerate; NotePlayHandle * m_nph; fpp_t m_fpp; WatsynInstrument * m_parent; SampleFrame* m_abuf; SampleFrame* m_bbuf; float m_lphase [NUM_OSCS]; float m_rphase [NUM_OSCS]; float m_A1wave [WAVELEN]; float m_A2wave [WAVELEN]; float m_B1wave [WAVELEN]; float m_B2wave [WAVELEN]; }; class WatsynInstrument : public Instrument { Q_OBJECT public: WatsynInstrument( InstrumentTrack * _instrument_track ); ~WatsynInstrument() override = default; void playNote( NotePlayHandle * _n, SampleFrame* _working_buffer ) override; void deleteNotePluginData( NotePlayHandle * _n ) override; void saveSettings( QDomDocument & _doc, QDomElement & _this ) override; void loadSettings( const QDomElement & _this ) override; QString nodeName() const override; float desiredReleaseTimeMs() const override { return 1.5f; } gui::PluginView* instantiateView( QWidget * _parent ) override; public slots: void updateVolumes(); void updateFreqA1(); void updateFreqA2(); void updateFreqB1(); void updateFreqB2(); void updateWaveA1(); void updateWaveA2(); void updateWaveB1(); void updateWaveB2(); protected: float m_lvol [NUM_OSCS]; float m_rvol [NUM_OSCS]; float m_lfreq [NUM_OSCS]; float m_rfreq [NUM_OSCS]; private: inline float leftCh( float _vol, float _pan ) { return ( _pan <= 0 ? 1.0 : 1.0 - ( _pan / 100.0 ) ) * _vol / 100.0; } inline float rightCh( float _vol, float _pan ) { return ( _pan >= 0 ? 1.0 : 1.0 + ( _pan / 100.0 ) ) * _vol / 100.0; } // memcpy utilizing libsamplerate (src) for sinc interpolation inline void srccpy( float * _dst, float * _src ) { int err; const int margin = 64; // copy to temp array float tmps [ GRAPHLEN + margin ]; // temp array in stack float * tmp = &tmps[0]; memcpy( tmp, _src, sizeof( float ) * GRAPHLEN ); memcpy( tmp + GRAPHLEN, _src, sizeof( float ) * margin ); SRC_STATE * src_state = src_new( SRC_SINC_FASTEST, 1, &err ); SRC_DATA src_data; src_data.data_in = tmp; src_data.input_frames = GRAPHLEN + margin; src_data.data_out = _dst; src_data.output_frames = WAVELEN; src_data.src_ratio = static_cast<double>( WAVERATIO ); src_data.end_of_input = 0; err = src_process( src_state, &src_data ); if( err ) { qDebug( "Watsyn SRC error: %s", src_strerror( err ) ); } src_delete( src_state ); } // memcpy utilizing cubic interpolation /* inline void cipcpy( float * _dst, float * _src ) { // calculate cyclic tangents float tang[GRAPHLEN]; tang[0] = ( _src[1] - _src[ GRAPHLEN - 1] ) / 2; tang[ GRAPHLEN - 1 ] = ( _src[0] - _src[ GRAPHLEN - 2 ] ) / 2; for( int i = 1; i < GRAPHLEN-1; i++ ) { tang[i] = ( _src[i+1] - _src[i-1] ) / 2; } // calculate cspline for( int i=0; i < WAVELEN; i++ ) { const float s1 = _src[ i / WAVERATIO ]; const float s2 = _src[ ( i / WAVERATIO + 1 ) % GRAPHLEN ]; const float m1 = tang[ i / WAVERATIO ]; const float m2 = tang[ ( i / WAVERATIO + 1 ) % GRAPHLEN ]; const float x = static_cast<float>( i % WAVERATIO ) / WAVERATIO; const float x2 = x * x; const float x3 = x * x * x; _dst[i] = ( ( x3 * 2.0 - x2 * 3.0 + 1.0 ) * s1 ) + ( ( x3 * -2.0 + x2 * 3.0 ) * s2 ) + ( ( x3 - x2 * 2 + x ) * m1 ) + ( ( x3 - x2 ) * m2 ); } }*/ FloatModel a1_vol; FloatModel a2_vol; FloatModel b1_vol; FloatModel b2_vol; FloatModel a1_pan; FloatModel a2_pan; FloatModel b1_pan; FloatModel b2_pan; FloatModel a1_mult; FloatModel a2_mult; FloatModel b1_mult; FloatModel b2_mult; FloatModel a1_ltune; FloatModel a2_ltune; FloatModel b1_ltune; FloatModel b2_ltune; FloatModel a1_rtune; FloatModel a2_rtune; FloatModel b1_rtune; FloatModel b2_rtune; graphModel a1_graph; graphModel a2_graph; graphModel b1_graph; graphModel b2_graph; FloatModel m_abmix; FloatModel m_envAmt; TempoSyncKnobModel m_envAtt; TempoSyncKnobModel m_envHold; TempoSyncKnobModel m_envDec; FloatModel m_xtalk; IntModel m_amod; IntModel m_bmod; IntModel m_selectedGraph; float A1_wave [WAVELEN]; float A2_wave [WAVELEN]; float B1_wave [WAVELEN]; float B2_wave [WAVELEN]; friend class WatsynObject; friend class gui::WatsynView; }; namespace gui { class WatsynView : public InstrumentViewFixedSize { Q_OBJECT public: WatsynView( Instrument * _instrument, QWidget * _parent ); ~WatsynView() override = default; protected slots: void updateLayout(); void sinWaveClicked(); void triWaveClicked(); void sawWaveClicked(); void sqrWaveClicked(); void smoothClicked(); void normalizeClicked(); void invertClicked(); void phaseLeftClicked(); void phaseRightClicked(); void loadClicked(); private: void modelChanged() override; // knobs Knob * a1_volKnob; Knob * a2_volKnob; Knob * b1_volKnob; Knob * b2_volKnob; Knob * a1_panKnob; Knob * a2_panKnob; Knob * b1_panKnob; Knob * b2_panKnob; Knob * a1_multKnob; Knob * a2_multKnob; Knob * b1_multKnob; Knob * b2_multKnob; Knob * a1_ltuneKnob; Knob * a2_ltuneKnob; Knob * b1_ltuneKnob; Knob * b2_ltuneKnob; Knob * a1_rtuneKnob; Knob * a2_rtuneKnob; Knob * b1_rtuneKnob; Knob * b2_rtuneKnob; Knob * m_abmixKnob; Knob * m_envAmtKnob; TempoSyncKnob * m_envAttKnob; TempoSyncKnob * m_envHoldKnob; TempoSyncKnob * m_envDecKnob; Knob * m_xtalkKnob; automatableButtonGroup * m_selectedGraphGroup; automatableButtonGroup * m_aModGroup; automatableButtonGroup * m_bModGroup; Graph * a1_graph; Graph * a2_graph; Graph * b1_graph; Graph * b2_graph; PixmapButton * m_sinWaveButton; PixmapButton * m_triWaveButton; PixmapButton * m_sawWaveButton; PixmapButton * m_sqrWaveButton; PixmapButton * m_normalizeButton; PixmapButton * m_invertButton; PixmapButton * m_smoothButton; PixmapButton * m_phaseLeftButton; PixmapButton * m_phaseRightButton; PixmapButton * m_loadButton; }; } // namespace gui } // namespace lmms #endif
8,697
C++
.h
309
25.731392
97
0.704896
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
true
false
false
false
false
false
false
20,052
LocalFileMng.h
LMMS_lmms/plugins/HydrogenImport/LocalFileMng.h
#ifndef LFILEMNG_H #define LFILEMNG_H #include <iostream> #include <fstream> #include <vector> #include <string> #include <QDomDocument> namespace lmms { class LocalFileMng { public: static QString readXmlString( QDomNode , const QString& nodeName, const QString& defaultValue, bool bCanBeEmpty = false, bool bShouldExists = true , bool tinyXmlCompatMode = false); static float readXmlFloat( QDomNode , const QString& nodeName, float defaultValue, bool bCanBeEmpty = false, bool bShouldExists = true , bool tinyXmlCompatMode = false); static int readXmlInt( QDomNode , const QString& nodeName, int defaultValue, bool bCanBeEmpty = false, bool bShouldExists = true , bool tinyXmlCompatMode = false); static bool readXmlBool( QDomNode , const QString& nodeName, bool defaultValue, bool bShouldExists = true , bool tinyXmlCompatMode = false ); static void convertFromTinyXMLString( QByteArray* str ); static bool checkTinyXMLCompatMode( const QString& filename ); static QDomDocument openXmlDocument( const QString& filename ); }; } // namespace lmms #endif //LFILEMNG_H
1,083
C++
.h
22
47.545455
182
0.797721
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,053
HydrogenImport.h
LMMS_lmms/plugins/HydrogenImport/HydrogenImport.h
#ifndef _HYDROGEN_IMPORT_H #define _HYDROGEN_IMPORT_H #include <QString> #include "ImportFilter.h" namespace lmms { class HydrogenImport : public ImportFilter { public: HydrogenImport( const QString & _file ); bool readSong(); ~HydrogenImport() override = default; gui::PluginView* instantiateView( QWidget * ) override { return( nullptr ); } private: bool tryImport( TrackContainer* tc ) override; }; } // namespace lmms #endif
456
C++
.h
21
19.428571
55
0.757075
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,054
MidiExport.h
LMMS_lmms/plugins/MidiExport/MidiExport.h
/* * MidiExport.h - support for Exporting MIDI-files * * Copyright (c) 2015 Mohamed Abdel Maksoud <mohamed at amaksoud.com> * Copyright (c) 2017 Hyunjin Song <tteu.ingog/at/gmail.com> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef _MIDI_EXPORT_H #define _MIDI_EXPORT_H #include <QString> #include "ExportFilter.h" #include "MidiFile.hpp" #include "Note.h" class QDomNode; namespace lmms { const int BUFFER_SIZE = 50*1024; using MTrack = MidiFile::MIDITrack<BUFFER_SIZE>; struct MidiNote { int time; uint8_t pitch; int duration; uint8_t volume; Note::Type type; inline bool operator<(const MidiNote &b) const { return this->time < b.time; } } ; using MidiNoteVector = std::vector<MidiNote>; using MidiNoteIterator = std::vector<MidiNote>::iterator; class MidiExport: public ExportFilter { // Q_OBJECT public: MidiExport(); ~MidiExport() override = default; // Default Beat Length in ticks for step notes // TODO: The beat length actually varies per note, however the method that // calculates it (InstrumentTrack::beatLen) requires a NotePlayHandle to do // so. While we don't figure out a way to hold the beat length of each note // on its member variables, we will use a default value as a beat length that // will be used as an upper limit of the midi note length. This doesn't worsen // the current logic used for MidiExport because right now the beat length is // not even considered during the generation of the MIDI. static constexpr int DefaultBeatLength = 1500; gui::PluginView* instantiateView(QWidget *) override { return nullptr; } bool tryExport(const TrackContainer::TrackList &tracks, const TrackContainer::TrackList &patternTracks, int tempo, int masterPitch, const QString &filename) override; private: void writeMidiClip(MidiNoteVector &midiClip, const QDomNode& n, int base_pitch, double base_volume, int base_time); void writeMidiClipToTrack(MTrack &mtrack, MidiNoteVector &nv); void writePatternClip(MidiNoteVector &src, MidiNoteVector &dst, int len, int base, int start, int end); void processPatternNotes(MidiNoteVector &nv, int cutPos); void error(); } ; } // namespace lmms #endif
2,935
C++
.h
82
33.658537
79
0.765454
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,056
Dispersion.h
LMMS_lmms/plugins/Dispersion/Dispersion.h
/* * Dispersion.h * * Copyright (c) 2023 Lost Robot <r94231/at/gmail/dot/com> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef LMMS_DISPERSION_H #define LMMS_DISPERSION_H #include "DispersionControls.h" #include "Effect.h" #include "lmms_math.h" namespace lmms { constexpr inline int MAX_DISPERSION_FILTERS = 999; class DispersionEffect : public Effect { public: DispersionEffect(Model* parent, const Descriptor::SubPluginFeatures::Key* key); ~DispersionEffect() override = default; ProcessStatus processImpl(SampleFrame* buf, const fpp_t frames) override; EffectControls* controls() override { return &m_dispersionControls; } void runDispersionAP(const int filtNum, const float apCoeff1, const float apCoeff2, std::array<sample_t, 2> &put); private: DispersionControls m_dispersionControls; float m_sampleRate; int m_amountVal; using Filter = std::array<sample_t, MAX_DISPERSION_FILTERS * 2>; struct FilterState { Filter x0{}; Filter x1{}; Filter y0{}; Filter y1{}; }; FilterState m_state = {}; std::array<float, 2> m_feedbackVal{}; std::array<float, 2> m_integrator{}; friend class DispersionControls; }; } // namespace lmms #endif // LMMS_DISPERSION_H
1,962
C++
.h
60
30.483333
115
0.760383
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,057
DispersionControls.h
LMMS_lmms/plugins/Dispersion/DispersionControls.h
/* * DispersionControls.h * * Copyright (c) 2023 Lost Robot <r94231/at/gmail/dot/com> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef LMMS_DISPERSION_CONTROLS_H #define LMMS_DISPERSION_CONTROLS_H #include "DispersionControlDialog.h" #include "EffectControls.h" namespace lmms { class DispersionEffect; namespace gui { class DispersionControlDialog; } class DispersionControls : public EffectControls { Q_OBJECT public: DispersionControls(DispersionEffect* effect); ~DispersionControls() override = default; void saveSettings(QDomDocument & doc, QDomElement & parent) override; void loadSettings(const QDomElement & parent) override; inline QString nodeName() const override { return "DispersionControls"; } int controlCount() override { return 5; } gui::EffectControlDialog* createView() override { return new gui::DispersionControlDialog(this); } private: DispersionEffect* m_effect; IntModel m_amountModel; FloatModel m_freqModel; FloatModel m_resoModel; FloatModel m_feedbackModel; BoolModel m_dcModel; friend class gui::DispersionControlDialog; friend class DispersionEffect; }; } // namespace lmms #endif // LMMS_DISPERSION_CONTROLS_H
1,940
C++
.h
66
27.409091
70
0.78752
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,058
DispersionControlDialog.h
LMMS_lmms/plugins/Dispersion/DispersionControlDialog.h
/* * DispersionControlDialog.h * * Copyright (c) 2023 Lost Robot <r94231/at/gmail/dot/com> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef LMMS_GUI_DISPERSION_CONTROL_DIALOG_H #define LMMS_GUI_DISPERSION_CONTROL_DIALOG_H #include "EffectControlDialog.h" namespace lmms { class DispersionControls; namespace gui { class DispersionControlDialog : public EffectControlDialog { Q_OBJECT public: DispersionControlDialog(DispersionControls* controls); ~DispersionControlDialog() override = default; }; } // namespace gui } // namespace lmms #endif // LMMS_GUI_DISPERSION_CONTROL_DIALOG_H
1,353
C++
.h
41
31.121951
70
0.778632
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,059
SaProcessor.h
LMMS_lmms/plugins/SpectrumAnalyzer/SaProcessor.h
/* SaProcessor.h - declaration of SaProcessor class. * * Copyright (c) 2019 Martin Pavelek <he29/dot/HS/at/gmail/dot/com> * * Based partially on Eq plugin code, * Copyright (c) 2014 David French <dave/dot/french3/at/googlemail/dot/com> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef SAPROCESSOR_H #define SAPROCESSOR_H #include <atomic> #include <fftw3.h> #include <QMutex> #include <QRgb> #include <vector> #include "lmms_basics.h" namespace lmms { template<class T> class LocklessRingBuffer; class SaControls; class SampleFrame; //! Receives audio data, runs FFT analysis and stores the result. class SaProcessor { public: explicit SaProcessor(const SaControls *controls); virtual ~SaProcessor(); // analysis thread and a method to terminate it void analyze(LocklessRingBuffer<SampleFrame> &ring_buffer); void terminate() {m_terminate = true;} // inform processor if any processing is actually required void setSpectrumActive(bool active); void setWaterfallActive(bool active); void flipRequest() {m_flipRequest = true;} // request refresh of history buffer // configuration is taken from models in SaControls; some changes require // an exlicit update request (reallocation and window rebuild) void reallocateBuffers(); void rebuildWindow(); void clear(); void clearHistory(); const float *getSpectrumL() const {return m_normSpectrumL.data();} const float *getSpectrumR() const {return m_normSpectrumR.data();} const uchar *getHistory() const {return m_history.data();} // information about results and unit conversion helpers unsigned int inBlockSize() const {return m_inBlockSize;} unsigned int binCount() const; //!< size of output (frequency domain) data block bool spectrumNotEmpty(); //!< check if result buffers contain any non-zero values unsigned int waterfallWidth() const; //!< binCount value capped at 3840 (for display) unsigned int waterfallHeight() const {return m_waterfallHeight;} bool waterfallNotEmpty() const {return m_waterfallNotEmpty;} float binToFreq(unsigned int bin_index) const; float binBandwidth() const; float freqToXPixel(float frequency, unsigned int width) const; float xPixelToFreq(float x, unsigned int width) const; float ampToYPixel(float amplitude, unsigned int height) const; float yPixelToAmp(float y, unsigned int height) const; unsigned int getSampleRate() const; float getNyquistFreq() const; float getFreqRangeMin(bool linear = false) const; float getFreqRangeMax() const; float getAmpRangeMin(bool linear = false) const; float getAmpRangeMax() const; // Reallocation lock prevents the processor from changing size of its buffers. // It is used to keep consistent bin-to-frequency mapping while drawing the // spectrum and to make sure reading side does not find itself out of bounds. // The processor is meanwhile free to work on another block. QMutex m_reallocationAccess; // Data access lock prevents the processor from changing both size and content // of its buffers. It is used when writing to a result buffer, or when a friendly // class reads them and needs guaranteed data consistency. // It causes FFT analysis to be paused, so this lock should be used sparingly. // If using both locks at the same time, reallocation lock MUST be acquired first. QMutex m_dataAccess; private: const SaControls *m_controls; // thread communication and control bool m_terminate; // currently valid configuration unsigned int m_zeroPadFactor = 2; //!< use n-steps bigger FFT for given block size std::atomic<unsigned int> m_inBlockSize;//!< size of input (time domain) data block unsigned int m_fftBlockSize; //!< size of padded block for FFT processing unsigned int m_sampleRate; // data buffers (roughly in the order of processing, from input to output) unsigned int m_framesFilledUp; std::vector<float> m_bufferL; //!< time domain samples (left) std::vector<float> m_bufferR; //!< time domain samples (right) std::vector<float> m_fftWindow; //!< precomputed window function coefficients std::vector<float> m_filteredBufferL; //!< time domain samples with window function applied (left) std::vector<float> m_filteredBufferR; //!< time domain samples with window function applied (right) fftwf_plan m_fftPlanL; fftwf_plan m_fftPlanR; fftwf_complex *m_spectrumL; //!< frequency domain samples (complex) (left) fftwf_complex *m_spectrumR; //!< frequency domain samples (complex) (right) std::vector<float> m_absSpectrumL; //!< frequency domain samples (absolute) (left) std::vector<float> m_absSpectrumR; //!< frequency domain samples (absolute) (right) std::vector<float> m_normSpectrumL; //!< frequency domain samples (normalized) (left) std::vector<float> m_normSpectrumR; //!< frequency domain samples (normalized) (right) // spectrum history for waterfall: new normSpectrum lines are added on top std::vector<uchar> m_history_work; //!< local history buffer for render std::vector<uchar> m_history; //!< public buffer for reading bool m_flipRequest; //!< update public buffer only when requested std::atomic<unsigned int> m_waterfallHeight; //!< number of stored lines in history buffer // Note: high values may make it harder to see transients. const unsigned int m_waterfallMaxWidth = 3840; // book keeping bool m_spectrumActive; bool m_waterfallActive; std::atomic<unsigned int> m_waterfallNotEmpty; //!< number of lines remaining visible on display bool m_reallocating; // merge L and R channels and apply gamma correction to make a spectrogram pixel QRgb makePixel(float left, float right) const; #ifdef SA_DEBUG unsigned int m_last_dump_time; unsigned int m_dump_count; float m_sum_execution; float m_max_execution; #endif }; } // namespace lmms #endif // SAPROCESSOR_H
6,552
C++
.h
138
45.297101
100
0.767241
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,060
SaSpectrumView.h
LMMS_lmms/plugins/SpectrumAnalyzer/SaSpectrumView.h
/* SaSpectrumView.h - declaration of SaSpectrumView class. * * Copyright (c) 2019 Martin Pavelek <he29/dot/HS/at/gmail/dot/com> * * Based partially on Eq plugin code, * Copyright (c) 2014 David French <dave/dot/french3/at/googlemail/dot/com> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef SASPECTRUMVIEW_H #define SASPECTRUMVIEW_H #include <string> #include <utility> #include <vector> #include <QPainterPath> #include <QWidget> class QMouseEvent; class QPainter; namespace lmms { class SaControls; class SaProcessor; namespace gui { //! Widget that displays a spectrum curve and frequency / amplitude grid class SaSpectrumView : public QWidget { Q_OBJECT public: explicit SaSpectrumView(SaControls *controls, SaProcessor *processor, QWidget *_parent = 0); ~SaSpectrumView() override = default; QSize sizeHint() const override {return QSize(400, 200);} protected: void paintEvent(QPaintEvent *event) override; void mouseMoveEvent(QMouseEvent *event) override; void mousePressEvent(QMouseEvent *event) override; void resizeEvent(QResizeEvent *event) override; private slots: void periodicUpdate(); private: const SaControls *m_controls; SaProcessor *m_processor; // grid labels (position, label) and methods to generate them std::vector<std::pair<int, std::string>> m_logFreqTics; // 10-20-50... Hz std::vector<std::pair<int, std::string>> m_linearFreqTics; // 2k-4k-6k... Hz std::vector<std::pair<float, std::string>> m_logAmpTics; // dB std::vector<std::pair<float, std::string>> m_linearAmpTics; // 0..1 std::vector<std::pair<int, std::string>> makeLogFreqTics(int low, int high); std::vector<std::pair<int, std::string>> makeLinearFreqTics(int low, int high); std::vector<std::pair<float, std::string>> makeLogAmpTics(int low, int high); std::vector<std::pair<float, std::string>> makeLinearAmpTics(int low, int high); // currently selected ranges (see SaControls.h for enum definitions) int m_freqRangeIndex; int m_ampRangeIndex; // draw the grid and all labels based on selected ranges void drawGrid(QPainter &painter); // local buffers for frequency bin values and a method to update them // (mainly needed for averaging and to keep track of peak values) std::vector<float> m_displayBufferL; std::vector<float> m_displayBufferR; std::vector<float> m_peakBufferL; std::vector<float> m_peakBufferR; void updateBuffers(const float *spectrum, float *displayBuffer, float *peakBuffer); // final paths to be drawn by QPainter and methods to build them QPainterPath m_pathL; QPainterPath m_pathR; QPainterPath m_pathPeakL; QPainterPath m_pathPeakR; void refreshPaths(); QPainterPath makePath(std::vector<float> &displayBuffer, float resolution); // helper variables for path drawing float m_decaySum; // indicates if there is anything left to draw bool m_freezeRequest; // new reference should be acquired bool m_frozen; // a reference is currently stored in the peakBuffer // top level: refresh buffers, make paths and draw the spectrum void drawSpectrum(QPainter &painter); // current cursor location and a method to draw it QPointF m_cursor; void drawCursor(QPainter &painter); // wrappers for most used SaProcessor conversion helpers // (to make local code more readable) float binToFreq(unsigned int bin_index); float freqToXPixel(float frequency, unsigned int width); float ampToYPixel(float amplitude, unsigned int height); // current boundaries for drawing unsigned int m_displayTop; unsigned int m_displayBottom; unsigned int m_displayLeft; unsigned int m_displayRight; unsigned int m_displayWidth; // cached frequency bin → x position conversion for better performance std::vector<float> m_cachedBinToX; float m_cachedRangeMin; float m_cachedRangeMax; bool m_cachedLogX; unsigned int m_cachedDisplayWidth; unsigned int m_cachedBinCount; unsigned int m_cachedSampleRate; #ifdef SA_DEBUG float m_execution_avg; float m_refresh_avg; float m_path_avg; float m_draw_avg; #endif }; } // namespace gui } // namespace lmms #endif // SASPECTRUMVIEW_H
4,826
C++
.h
124
36.846774
93
0.774732
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,061
Analyzer.h
LMMS_lmms/plugins/SpectrumAnalyzer/Analyzer.h
/* Analyzer.h - declaration of Analyzer class. * * Copyright (c) 2019 Martin Pavelek <he29/dot/HS/at/gmail/dot/com> * * Based partially on Eq plugin code, * Copyright (c) 2014-2017, David French <dave/dot/french3/at/googlemail/dot/com> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef ANALYZER_H #define ANALYZER_H #include "DataprocLauncher.h" #include "Effect.h" #include "LocklessRingBuffer.h" #include "SaControls.h" #include "SaProcessor.h" namespace lmms { //! Top level class; handles LMMS interface and feeds data to the data processor. class Analyzer : public Effect { public: Analyzer(Model *parent, const Descriptor::SubPluginFeatures::Key *key); ~Analyzer() override; ProcessStatus processImpl(SampleFrame* buf, const fpp_t frames) override; EffectControls *controls() override {return &m_controls;} SaProcessor *getProcessor() {return &m_processor;} private: SaProcessor m_processor; SaControls m_controls; // Maximum LMMS buffer size (hard coded, the actual constant is hard to get) const unsigned int m_maxBufferSize = 4096; // QThread::create() workaround // Replace DataprocLauncher by QThread and replace initializer in constructor // with the following commented line when LMMS CI starts using Qt > 5.9 //m_processorThread = QThread::create([=]{m_processor.analyze(m_inputBuffer);}); DataprocLauncher m_processorThread; LocklessRingBuffer<SampleFrame> m_inputBuffer; #ifdef SA_DEBUG int m_last_dump_time; int m_dump_count; float m_sum_execution; float m_max_execution; #endif }; } // namespace lmms #endif // ANALYZER_H
2,340
C++
.h
63
35.079365
81
0.768039
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,062
SaWaterfallView.h
LMMS_lmms/plugins/SpectrumAnalyzer/SaWaterfallView.h
/* SaWaterfallView.h - declaration of SaWaterfallView class. * * Copyright (c) 2019 Martin Pavelek <he29/dot/HS/at/gmail/dot/com> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef SAWATERFALLVIEW_H #define SAWATERFALLVIEW_H #include <string> #include <utility> #include <vector> #include <QWidget> class QMouseEvent; namespace lmms { class SaControls; class SaProcessor; } namespace lmms::gui { class EffectControlDialog; // Widget that displays a spectrum waterfall (spectrogram) and time labels. class SaWaterfallView : public QWidget { Q_OBJECT public: explicit SaWaterfallView(SaControls *controls, SaProcessor *processor, QWidget *_parent = 0); ~SaWaterfallView() override = default; QSize sizeHint() const override {return QSize(400, 350);} // Check if waterfall should be displayed and adjust window size if needed. void updateVisibility(); protected: void paintEvent(QPaintEvent *event) override; void mouseMoveEvent(QMouseEvent *event) override; void mousePressEvent(QMouseEvent *event) override; void resizeEvent(QResizeEvent *event) override; private slots: void periodicUpdate(); private: const SaControls *m_controls; SaProcessor *m_processor; const EffectControlDialog *m_controlDialog; // Methods and data used to make time labels float m_oldSecondsPerLine; float m_oldHeight; float samplesPerLine(); float secondsPerLine(); float timeToYPixel(float time, int height); float yPixelToTime(float position, int height); std::vector<std::pair<float, std::string>> makeTimeTics(); std::vector<std::pair<float, std::string>> m_timeTics; // 0..n (s) // current cursor location and a method to draw it QPointF m_cursor; void drawCursor(QPainter &painter); // current boundaries for drawing unsigned int m_displayTop; unsigned int m_displayBottom; unsigned int m_displayLeft; unsigned int m_displayRight; unsigned int m_displayWidth; unsigned int m_displayHeight; #ifdef SA_DEBUG float m_execution_avg; #endif }; } // namespace lmms::gui #endif // SAWATERFALLVIEW_H
2,783
C++
.h
83
31.590361
94
0.782836
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,063
DataprocLauncher.h
LMMS_lmms/plugins/SpectrumAnalyzer/DataprocLauncher.h
/* * DataprocLauncher.h - QThread::create workaround for older Qt version * * Copyright (c) 2019 Martin Pavelek <he29/dot/HS/at/gmail/dot/com> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef DATAPROCLAUNCHER_H #define DATAPROCLAUNCHER_H #include <QThread> #include "SaProcessor.h" #include "LocklessRingBuffer.h" namespace lmms { class DataprocLauncher : public QThread { public: explicit DataprocLauncher(SaProcessor &proc, LocklessRingBuffer<SampleFrame> &buffer) : m_processor(&proc), m_inputBuffer(&buffer) { } private: void run() override { m_processor->analyze(*m_inputBuffer); } SaProcessor *m_processor; LocklessRingBuffer<SampleFrame> *m_inputBuffer; }; } // namespace lmms #endif // DATAPROCLAUNCHER_H
1,494
C++
.h
48
29.145833
86
0.767944
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,064
SaControlsDialog.h
LMMS_lmms/plugins/SpectrumAnalyzer/SaControlsDialog.h
/* * SaControlsDialog.h - declatation of SaControlsDialog class. * * Copyright (c) 2019 Martin Pavelek <he29/dot/HS/at/gmail/dot/com> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef SACONTROLSDIALOG_H #define SACONTROLSDIALOG_H #include "EffectControlDialog.h" #include "fft_helpers.h" namespace lmms { class SaControls; class SaProcessor; } namespace lmms::gui { class SaSpectrumView; class SaWaterfallView; //! Top-level widget holding the configuration GUI and spectrum displays class SaControlsDialog : public EffectControlDialog { Q_OBJECT public: explicit SaControlsDialog(SaControls *controls, SaProcessor *processor); ~SaControlsDialog() override = default; bool isResizable() const override {return true;} QSize sizeHint() const override; private: SaControls *m_controls; SaProcessor *m_processor; // Pointers to created widgets are needed to keep track of their sizeHint() changes. // Config widget is a plain QWidget so it has just a fixed height instead. const int m_configHeight = 75; SaSpectrumView *m_spectrum; SaWaterfallView *m_waterfall; }; } // namespace lmms::gui #endif // SACONTROLSDIALOG_H
1,895
C++
.h
56
32
85
0.782037
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,065
SaControls.h
LMMS_lmms/plugins/SpectrumAnalyzer/SaControls.h
/* * SaControls.h - declaration of SaControls class. * * Copyright (c) 2019 Martin Pavelek <he29/dot/HS/at/gmail/dot/com> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef SACONTROLS_H #define SACONTROLS_H #include "ComboBoxModel.h" #include "EffectControls.h" //#define SA_DEBUG 1 // define SA_DEBUG to enable performance measurements namespace lmms { class Analyzer; namespace gui { class SaControlsDialog; class SaSpectrumView; class SaWaterfallView; } // Holds all the configuration values class SaControls : public EffectControls { Q_OBJECT public: explicit SaControls(Analyzer* effect); ~SaControls() override = default; gui::EffectControlDialog* createView() override; void saveSettings (QDomDocument& doc, QDomElement& parent) override; void loadSettings (const QDomElement &_this) override; QString nodeName() const override {return "Analyzer";} int controlCount() override {return 20;} private: Analyzer *m_effect; // basic settings BoolModel m_pauseModel; BoolModel m_refFreezeModel; BoolModel m_waterfallModel; BoolModel m_smoothModel; BoolModel m_stereoModel; BoolModel m_peakHoldModel; BoolModel m_logXModel; BoolModel m_logYModel; ComboBoxModel m_freqRangeModel; ComboBoxModel m_ampRangeModel; ComboBoxModel m_blockSizeModel; ComboBoxModel m_windowModel; // advanced settings FloatModel m_envelopeResolutionModel; FloatModel m_spectrumResolutionModel; FloatModel m_peakDecayFactorModel; FloatModel m_averagingWeightModel; FloatModel m_waterfallHeightModel; FloatModel m_waterfallGammaModel; FloatModel m_windowOverlapModel; FloatModel m_zeroPaddingModel; // colors (hard-coded, values must add up to specific numbers) QColor m_colorL; //!< color of the left channel QColor m_colorR; //!< color of the right channel QColor m_colorMono; //!< mono color for spectrum display QColor m_colorMonoW; //!< mono color for waterfall display QColor m_colorBG; //!< spectrum display background color QColor m_colorGrid; //!< color of grid lines QColor m_colorLabels; //!< color of axis labels friend class gui::SaControlsDialog; friend class gui::SaSpectrumView; friend class gui::SaWaterfallView; friend class SaProcessor; }; } // namespace lmms #endif // SACONTROLS_H
2,998
C++
.h
88
32.079545
74
0.790512
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,066
GranularPitchShifterEffect.h
LMMS_lmms/plugins/GranularPitchShifter/GranularPitchShifterEffect.h
/* * GranularPitchShifter.h * * Copyright (c) 2024 Lost Robot <r94231/at/gmail/dot/com> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef LMMS_GRANULAR_PITCH_SHIFTER_EFFECT_H #define LMMS_GRANULAR_PITCH_SHIFTER_EFFECT_H #include "Effect.h" #include "GranularPitchShifterControls.h" #include "BasicFilters.h" #include "interpolation.h" namespace lmms { constexpr float PrefilterBandwidth = 0.96f;// 96% of nyquist constexpr double GlideSnagRadius = 0.001; constexpr int SafetyLatency = 3; constexpr float RangeSeconds[5] = {5, 10, 40, 40, 120}; constexpr float DcRemovalHz = 7.f; constexpr float SatuSafeVol = 16.f; constexpr float SatuStrength = 0.001f; class GranularPitchShifterEffect : public Effect { public: GranularPitchShifterEffect(Model* parent, const Descriptor::SubPluginFeatures::Key* key); ~GranularPitchShifterEffect() override = default; ProcessStatus processImpl(SampleFrame* buf, const fpp_t frames) override; EffectControls* controls() override { return &m_granularpitchshifterControls; } // double index and fraction are required for good quality float getHermiteSample(double index, int ch) { const auto index_floor = static_cast<std::size_t>(index); const double fraction = index - index_floor; float v0, v1, v2, v3; if (index_floor == 0) { v0 = m_ringBuf[m_ringBuf.size() - 1][ch]; } else { v0 = m_ringBuf[index_floor - 1][ch]; } v1 = m_ringBuf[index_floor][ch]; if(index_floor >= m_ringBuf.size() - 2) { v2 = m_ringBuf[(index_floor + 1) % m_ringBuf.size()][ch]; v3 = m_ringBuf[(index_floor + 2) % m_ringBuf.size()][ch]; } else { v2 = m_ringBuf[index_floor + 1][ch]; v3 = m_ringBuf[index_floor + 2][ch]; } return hermiteInterpolate(v0, v1, v2, v3, static_cast<float>(fraction)); } // adapted from signalsmith's crossfade approximation: // https://signalsmith-audio.co.uk/writing/2021/cheap-energy-crossfade float cosHalfWindowApprox(float x, float k) { float A = x * (1 - x); float B = A * (1 + k * A); float C = (B + x); return C * C; } // 1-2 fades between equal-gain and equal-power float cosWindowApproxK(float p) { return -6.0026608f + p * (6.8773512f - 1.5838104f * p); } // designed to use minimal CPU if the input isn't loud float safetySaturate(float input) { float absInput = std::abs(input); return absInput <= SatuSafeVol ? input : std::copysign((absInput - SatuSafeVol) / (1 + (absInput - SatuSafeVol) * SatuStrength) + SatuSafeVol, input); } void sampleRateNeedsUpdate() { m_sampleRateNeedsUpdate = true; } void changeSampleRate(); private: struct PrefilterLowpass { float m_v0z = 0.f, m_v1 = 0.f, m_v2 = 0.f; float m_g1, m_g2, m_g3, m_g4; void setCoefs(float sampleRate, float cutoff) { const float g = std::tan(F_PI * cutoff / sampleRate); const float ginv = g / (1.f + g * (g + F_SQRT_2)); m_g1 = ginv; m_g2 = 2.f * (g + F_SQRT_2) * ginv; m_g3 = g * ginv; m_g4 = 2.f * ginv; } float process(float input) { const float v1z = m_v1; const float v3 = input + m_v0z - 2.f * m_v2; m_v1 += m_g1 * v3 - m_g2 * v1z; m_v2 += m_g3 * v3 + m_g4 * v1z; m_v0z = input; return m_v2; } }; struct Grain { Grain(double grainSpeedL, double grainSpeedR, double phaseSpeedL, double phaseSpeedR, double readPointL, double readPointR) : readPoint{readPointL, readPointR}, phaseSpeed{phaseSpeedL, phaseSpeedR}, grainSpeed{grainSpeedL, grainSpeedR}, phase{0} {} std::array<double, 2> readPoint; std::array<double, 2> phaseSpeed; std::array<double, 2> grainSpeed; double phase; }; GranularPitchShifterControls m_granularpitchshifterControls; std::vector<std::array<float, 2>> m_ringBuf; std::vector<Grain> m_grains; std::array<PrefilterLowpass, 2> m_prefilter; std::array<double, 2> m_speed = {1, 1}; std::array<double, 2> m_truePitch = {0, 0}; std::array<float, 2> m_dcVal = {0, 0}; float m_sampleRate; float m_nyquist; float m_nextWaitRandomization = 1; float m_dcCoeff; int m_ringBufLength = 0; int m_writePoint = 0; int m_grainCount = 0; int m_timeSinceLastGrain = 999999999; double m_oldGlide = -1; double m_glideCoef = 0; bool m_sampleRateNeedsUpdate = false; bool m_updatePitches = true; friend class GranularPitchShifterControls; }; } // namespace lmms #endif // LMMS_GRANULAR_PITCH_SHIFTER_EFFECT_H
5,144
C++
.h
152
30.927632
127
0.708881
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,067
GranularPitchShifterControls.h
LMMS_lmms/plugins/GranularPitchShifter/GranularPitchShifterControls.h
/* * GranularPitchShifterControls.h * * Copyright (c) 2024 Lost Robot <r94231/at/gmail/dot/com> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef LMMS_GRANULAR_PITCH_SHIFTER_CONTROL_DIALOG_H #define LMMS_GRANULAR_PITCH_SHIFTER_CONTROL_DIALOG_H #include "EffectControls.h" #include "GranularPitchShifterControlDialog.h" namespace lmms { class GranularPitchShifterEffect; namespace gui { class GranularPitchShifterControlDialog; } class GranularPitchShifterControls : public EffectControls { Q_OBJECT public: GranularPitchShifterControls(GranularPitchShifterEffect* effect); ~GranularPitchShifterControls() override = default; void saveSettings(QDomDocument& doc, QDomElement& parent) override; void loadSettings(const QDomElement& parent) override; inline QString nodeName() const override { return "GranularPitchShifterControls"; } gui::EffectControlDialog* createView() override { return new gui::GranularPitchShifterControlDialog(this); } int controlCount() override { return 4; } public slots: void updateRange(); private: GranularPitchShifterEffect* m_effect; FloatModel m_pitchModel; FloatModel m_sizeModel; FloatModel m_sprayModel; FloatModel m_jitterModel; FloatModel m_twitchModel; FloatModel m_pitchSpreadModel; FloatModel m_spraySpreadModel; FloatModel m_shapeModel; FloatModel m_fadeLengthModel; FloatModel m_feedbackModel; FloatModel m_minLatencyModel; BoolModel m_prefilterModel; FloatModel m_densityModel; FloatModel m_glideModel; ComboBoxModel m_rangeModel; friend class gui::GranularPitchShifterControlDialog; friend class GranularPitchShifterEffect; }; } // namespace lmms #endif // LMMS_GRANULAR_PITCH_SHIFTER_CONTROL_DIALOG_H
2,449
C++
.h
75
30.706667
70
0.810593
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,068
GranularPitchShifterControlDialog.h
LMMS_lmms/plugins/GranularPitchShifter/GranularPitchShifterControlDialog.h
/* * GranularPitchShifterControlDialog.h * * Copyright (c) 2024 Lost Robot <r94231/at/gmail/dot/com> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef LMMS_GRANULAR_PITCH_SHIFTER_CONTROLS_H #define LMMS_GRANULAR_PITCH_SHIFTER_CONTROLS_H #include "EffectControlDialog.h" #include <QTextEdit> #include "ComboBox.h" #include "GuiApplication.h" #include "MainWindow.h" namespace lmms { class GranularPitchShifterControls; class FloatModel; namespace gui { class Knob; class GranularPitchShifterControlDialog : public EffectControlDialog { Q_OBJECT public: GranularPitchShifterControlDialog(GranularPitchShifterControls* controls); ~GranularPitchShifterControlDialog() override = default; public slots: void showHelpWindow(); }; class GranularPitchShifterHelpView : public QTextEdit { Q_OBJECT public: static GranularPitchShifterHelpView* getInstance() { static GranularPitchShifterHelpView instance; return &instance; } private: GranularPitchShifterHelpView(); static QString s_helpText; }; } // namespace gui } // namespace lmms #endif // LMMS_GRANULAR_PITCH_SHIFTER_CONTROLS_H
1,857
C++
.h
62
28.16129
75
0.798541
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,069
Lv2Instrument.h
LMMS_lmms/plugins/Lv2Instrument/Lv2Instrument.h
/* * Lv2Instrument.h - implementation of LV2 instrument * * Copyright (c) 2018-2023 Johannes Lorenz <jlsf2013$users.sourceforge.net, $=@> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef LV2_INSTRUMENT_H #define LV2_INSTRUMENT_H #include <QString> #include <array> #include "Instrument.h" #include "InstrumentView.h" #include "Lv2ControlBase.h" #include "Lv2ViewBase.h" #include "Note.h" // whether to use MIDI vs playHandle // currently only MIDI works #define LV2_INSTRUMENT_USE_MIDI namespace lmms { namespace gui { class Lv2InsView; } class Lv2Instrument : public Instrument, public Lv2ControlBase { Q_OBJECT signals: void modelChanged(); public: /* initialization */ Lv2Instrument(InstrumentTrack *instrumentTrackArg, Descriptor::SubPluginFeatures::Key* key); ~Lv2Instrument() override; void reload(); void onSampleRateChanged(); /* load/save */ void saveSettings(QDomDocument &doc, QDomElement &that) override; void loadSettings(const QDomElement &that) override; void loadFile(const QString &file) override; /* realtime funcs */ bool hasNoteInput() const override { return Lv2ControlBase::hasNoteInput(); } #ifdef LV2_INSTRUMENT_USE_MIDI bool handleMidiEvent(const MidiEvent &event, const TimePos &time = TimePos(), f_cnt_t offset = 0) override; #else void playNote(NotePlayHandle *nph, SampleFrame*) override; #endif void play(SampleFrame* buf) override; /* misc */ gui::PluginView* instantiateView(QWidget *parent) override; private slots: void updatePitchRange(); private: QString nodeName() const override; #ifdef LV2_INSTRUMENT_USE_MIDI std::array<int, NumKeys> m_runningNotes = {}; #endif void clearRunningNotes(); friend class gui::Lv2InsView; }; namespace gui { class Lv2InsView : public InstrumentView, public Lv2ViewBase { Q_OBJECT public: Lv2InsView(Lv2Instrument *_instrument, QWidget *_parent); protected: void dragEnterEvent(QDragEnterEvent *_dee) override; void dropEvent(QDropEvent *_de) override; void hideEvent(QHideEvent* event) override; private: void modelChanged() override; }; } // namespace gui } // namespace lmms #endif // LV2_INSTRUMENT_H
2,901
C++
.h
103
26.252427
80
0.776976
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,070
Sfxr.h
LMMS_lmms/plugins/Sfxr/Sfxr.h
/* * Sfxr.h - declaration of classes of the LMMS sfxr plugin * Originally written by Tomas Pettersson. For the original license, * please read readme.txt in this directory * * Copyright (c) 2014 Wong Cho Ching * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef SFXR_H #define SFXR_H #include <array> #include "AutomatableModel.h" #include "Instrument.h" #include "InstrumentView.h" namespace lmms { enum class SfxrWave { Square, Saw, Sine, Noise, Count }; constexpr auto NumSfxrWaves = static_cast<std::size_t>(SfxrWave::Count); const int WAVEFORM_BASE_X = 20; const int WAVEFORM_BASE_Y = 15; const int WAVEFORM_BUTTON_WIDTH = 16; const int GENERATOR_BASE_X = 110; const int GENERATOR_BASE_Y = 25; const int GENERATOR_BUTTON_WIDTH = 16; const int RAND_BUTTON_X = 160; const int RAND_BUTTON_Y = 4; const int MUTA_BUTTON_X = 205; const int MUTA_BUTTON_Y = 4; const int KNOBS_BASE_X = 20; const int KNOBS_BASE_Y = 50; const int KNOB_BLOCK_SIZE_X = 40; const int KNOB_BLOCK_SIZE_Y = 40; class SfxrInstrument; namespace gui { class automatableButtonGroup; class Knob; class PixmapButton; class SfxrInstrumentView; } class SfxrSynth { public: SfxrSynth( const SfxrInstrument * s ); virtual ~SfxrSynth() = default; void resetSample( bool restart ); void update( SampleFrame* buffer, const int32_t frameNum ); bool isPlaying() const; private: const SfxrInstrument * s; bool playing_sample; int phase; double fperiod; double fmaxperiod; double fslide; double fdslide; int period; float square_duty; float square_slide; int env_stage; int env_time; int env_length[3]; float env_vol; float fphase; float fdphase; int iphase; std::array<float, 1024> phaser_buffer; int ipp; float noise_buffer[32]; float fltp; float fltdp; float fltw; float fltw_d; float fltdmp; float fltphp; float flthp; float flthp_d; float vib_phase; float vib_speed; float vib_amp; int rep_time; int rep_limit; int arp_time; int arp_limit; double arp_mod; } ; /** * @brief A class that simplify the constructor of FloatModel, with value [0,1] */ class SfxrZeroToOneFloatModel : public FloatModel { public: SfxrZeroToOneFloatModel( float val, Model * parent, const QString& displayName ): FloatModel(val, 0.f, 1.f, 0.001f, parent, displayName) { } /* purpose: prevent the initial value of the model from being changed */ void loadSettings( const QDomElement& element, const QString& name = QString( "value" ) ) override { float oldInitValue = initValue(); FloatModel::loadSettings(element, name); float oldValue = value(); setInitValue(oldInitValue); setValue(oldValue); } }; /** * @brief A class that simplify the constructor of FloatModel, with value [-1,1] */ class SfxrNegPosOneFloatModel : public FloatModel { public: SfxrNegPosOneFloatModel(float val, Model * parent, const QString& displayName ): FloatModel(val, -1.f, 1.f, 0.001f, parent, displayName) { } /* purpose: prevent the initial value of the model from being changed */ void loadSettings( const QDomElement& element, const QString& name = QString( "value" ) ) override { float oldInitValue = initValue(); FloatModel::loadSettings(element, name); float oldValue = value(); setInitValue(oldInitValue); setValue(oldValue); } }; class SfxrInstrument : public Instrument { Q_OBJECT public: SfxrInstrument(InstrumentTrack * _instrument_track ); ~SfxrInstrument() override = default; void playNote( NotePlayHandle * _n, SampleFrame* _working_buffer ) override; void deleteNotePluginData( NotePlayHandle * _n ) override; void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; void loadSettings( const QDomElement & _this ) override; QString nodeName() const override; gui::PluginView* instantiateView( QWidget * _parent ) override; void resetModels(); private: SfxrZeroToOneFloatModel m_attModel; SfxrZeroToOneFloatModel m_holdModel; SfxrZeroToOneFloatModel m_susModel; SfxrZeroToOneFloatModel m_decModel; SfxrZeroToOneFloatModel m_startFreqModel; SfxrZeroToOneFloatModel m_minFreqModel; SfxrNegPosOneFloatModel m_slideModel; SfxrNegPosOneFloatModel m_dSlideModel; SfxrZeroToOneFloatModel m_vibDepthModel; SfxrZeroToOneFloatModel m_vibSpeedModel; SfxrNegPosOneFloatModel m_changeAmtModel; SfxrZeroToOneFloatModel m_changeSpeedModel; SfxrZeroToOneFloatModel m_sqrDutyModel; SfxrNegPosOneFloatModel m_sqrSweepModel; SfxrZeroToOneFloatModel m_repeatSpeedModel; SfxrNegPosOneFloatModel m_phaserOffsetModel; SfxrNegPosOneFloatModel m_phaserSweepModel; SfxrZeroToOneFloatModel m_lpFilCutModel; SfxrNegPosOneFloatModel m_lpFilCutSweepModel; SfxrZeroToOneFloatModel m_lpFilResoModel; SfxrZeroToOneFloatModel m_hpFilCutModel; SfxrNegPosOneFloatModel m_hpFilCutSweepModel; IntModel m_waveFormModel; friend class gui::SfxrInstrumentView; friend class SfxrSynth; }; namespace gui { class SfxrInstrumentView : public InstrumentViewFixedSize { Q_OBJECT public: SfxrInstrumentView( Instrument * _instrument, QWidget * _parent ); ~SfxrInstrumentView() override = default; protected slots: void genPickup(); void genLaser(); void genExplosion(); void genPowerup(); void genHit(); void genJump(); void genBlip(); void randomize(); void mutate(); void previewSound(); private: void modelChanged() override; Knob * m_attKnob; //Attack Time Knob * m_holdKnob; //Sustain Time Knob * m_susKnob; //Sustain Punch Knob * m_decKnob; //Decay Time Knob * m_startFreqKnob; //Start Frequency Knob * m_minFreqKnob; //Min Frequency Knob * m_slideKnob; //Slide Knob * m_dSlideKnob; //Delta Slide Knob * m_vibDepthKnob; //Vibrato Depth Knob * m_vibSpeedKnob; //Vibrato Speed Knob * m_changeAmtKnob; //Change Amount Knob * m_changeSpeedKnob; //Change Speed Knob * m_sqrDutyKnob; //Square Wave Duty Knob * m_sqrSweepKnob; //Square Wave Duty Sweep Knob * m_repeatSpeedKnob; //Repeat Speed Knob * m_phaserOffsetKnob; //Phaser Offset Knob * m_phaserSweepKnob; //Phaser Sweep Knob * m_lpFilCutKnob; //LP Filter Cutoff Knob * m_lpFilCutSweepKnob; //LP Filter Cutoff Sweep Knob * m_lpFilResoKnob; //LP Filter Resonance Knob * m_hpFilCutKnob; //HP Filter Cutoff Knob * m_hpFilCutSweepKnob; //HP Filter Cutoff Sweep automatableButtonGroup * m_waveBtnGroup; PixmapButton * m_sqrWaveBtn; //NOTE: This button has Square Duty //and Square Speed configurable PixmapButton * m_sawWaveBtn; PixmapButton * m_sinWaveBtn; PixmapButton * m_noiseWaveBtn; PixmapButton * m_pickupBtn; PixmapButton * m_laserBtn; PixmapButton * m_explosionBtn; PixmapButton * m_powerupBtn; PixmapButton * m_hitBtn; PixmapButton * m_jumpBtn; PixmapButton * m_blipBtn; PixmapButton * m_randomizeBtn; PixmapButton * m_mutateBtn; static QPixmap * s_artwork; }; } // namespace gui } // namespace lmms #endif
7,579
C++
.h
251
28.063745
99
0.777441
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
true
false
false
false
false
false
false
20,071
TripleOscillator.h
LMMS_lmms/plugins/TripleOscillator/TripleOscillator.h
/* * TripleOscillator.h - declaration of class TripleOscillator a powerful * instrument-plugin with 3 oscillators * * Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef _TRIPLE_OSCILLATOR_H #define _TRIPLE_OSCILLATOR_H #include <memory> #include "Instrument.h" #include "InstrumentView.h" #include "AutomatableModel.h" #include "OscillatorConstants.h" #include "SampleBuffer.h" namespace lmms { class NotePlayHandle; class SampleBuffer; class Oscillator; namespace gui { class automatableButtonGroup; class Knob; class PixmapButton; class TripleOscillatorView; } // namespace gui const int NUM_OF_OSCILLATORS = 3; class OscillatorObject : public Model { Q_OBJECT public: OscillatorObject( Model * _parent, int _idx ); private: FloatModel m_volumeModel; FloatModel m_panModel; FloatModel m_coarseModel; FloatModel m_fineLeftModel; FloatModel m_fineRightModel; FloatModel m_phaseOffsetModel; FloatModel m_stereoPhaseDetuningModel; IntModel m_waveShapeModel; IntModel m_modulationAlgoModel; BoolModel m_useWaveTableModel; std::shared_ptr<const SampleBuffer> m_sampleBuffer = SampleBuffer::emptyBuffer(); std::shared_ptr<const OscillatorConstants::waveform_t> m_userAntiAliasWaveTable; float m_volumeLeft; float m_volumeRight; // normalized detuning -> x/sampleRate float m_detuningLeft; float m_detuningRight; // normalized offset -> x/360 float m_phaseOffsetLeft; float m_phaseOffsetRight; bool m_useWaveTable; friend class TripleOscillator; friend class gui::TripleOscillatorView; private slots: void oscUserDefWaveDblClick(); void updateVolume(); void updateDetuningLeft(); void updateDetuningRight(); void updatePhaseOffsetLeft(); void updatePhaseOffsetRight(); void updateUseWaveTable(); } ; class TripleOscillator : public Instrument { Q_OBJECT public: TripleOscillator( InstrumentTrack * _track ); ~TripleOscillator() override = default; void playNote( NotePlayHandle * _n, SampleFrame* _working_buffer ) override; void deleteNotePluginData( NotePlayHandle * _n ) override; void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; void loadSettings( const QDomElement & _this ) override; QString nodeName() const override; float desiredReleaseTimeMs() const override { return 3.f; } gui::PluginView* instantiateView( QWidget * _parent ) override; protected slots: void updateAllDetuning(); private: OscillatorObject * m_osc[NUM_OF_OSCILLATORS]; struct oscPtr { Oscillator * oscLeft; Oscillator * oscRight; } ; friend class gui::TripleOscillatorView; } ; namespace gui { class TripleOscillatorView : public InstrumentViewFixedSize { Q_OBJECT public: TripleOscillatorView( Instrument * _instrument, QWidget * _parent ); ~TripleOscillatorView() override = default; private: void modelChanged() override; automatableButtonGroup * m_mod1BtnGrp; automatableButtonGroup * m_mod2BtnGrp; struct OscillatorKnobs { OscillatorKnobs( Knob * v, Knob * p, Knob * c, Knob * fl, Knob * fr, Knob * po, Knob * spd, PixmapButton * uwb, automatableButtonGroup * wsbg, PixmapButton * wt) : m_volKnob( v ), m_panKnob( p ), m_coarseKnob( c ), m_fineLeftKnob( fl ), m_fineRightKnob( fr ), m_phaseOffsetKnob( po ), m_stereoPhaseDetuningKnob( spd ), m_userWaveButton( uwb ), m_waveShapeBtnGrp( wsbg ), m_multiBandWaveTableButton( wt ) { } OscillatorKnobs() = default; Knob * m_volKnob; Knob * m_panKnob; Knob * m_coarseKnob; Knob * m_fineLeftKnob; Knob * m_fineRightKnob; Knob * m_phaseOffsetKnob; Knob * m_stereoPhaseDetuningKnob; PixmapButton * m_userWaveButton; automatableButtonGroup * m_waveShapeBtnGrp; PixmapButton * m_multiBandWaveTableButton; } ; OscillatorKnobs m_oscKnobs[NUM_OF_OSCILLATORS]; } ; } // namespace gui } // namespace lmms #endif
4,725
C++
.h
164
26.292683
82
0.768514
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,072
FreeBoy.h
LMMS_lmms/plugins/FreeBoy/FreeBoy.h
/* * FreeBoy.h - GameBoy papu based instrument * * Copyright (c) 2008 Attila Herman <attila589/at/gmail.com> * Csaba Hruska <csaba.hruska/at/gmail.com> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef LMMS_FREEBOY_H #define LMMS_FREEBOY_H #include <Blip_Buffer.h> #include "AutomatableModel.h" #include "Instrument.h" #include "InstrumentView.h" #include "Graph.h" namespace lmms { class NotePlayHandle; namespace gui { class PixmapButton; class FreeBoyInstrumentView; class Knob; } class FreeBoyInstrument : public Instrument { Q_OBJECT public: FreeBoyInstrument( InstrumentTrack * _instrument_track ); ~FreeBoyInstrument() override = default; void playNote(NotePlayHandle* nph, SampleFrame* workingBuffer) override; void deleteNotePluginData(NotePlayHandle* nph) override; void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; void loadSettings( const QDomElement & _this ) override; QString nodeName() const override; float desiredReleaseTimeMs() const override; gui::PluginView* instantiateView( QWidget * _parent ) override; /*public slots: void updateKnobHint(); void updateKnobToolTip();*/ private: FloatModel m_ch1SweepTimeModel; BoolModel m_ch1SweepDirModel; FloatModel m_ch1SweepRtShiftModel; FloatModel m_ch1WavePatternDutyModel; FloatModel m_ch1VolumeModel; BoolModel m_ch1VolSweepDirModel; FloatModel m_ch1SweepStepLengthModel; FloatModel m_ch2WavePatternDutyModel; FloatModel m_ch2VolumeModel; BoolModel m_ch2VolSweepDirModel; FloatModel m_ch2SweepStepLengthModel; BoolModel m_ch3OnModel; FloatModel m_ch3VolumeModel; FloatModel m_ch4VolumeModel; BoolModel m_ch4VolSweepDirModel; FloatModel m_ch4SweepStepLengthModel; FloatModel m_ch4ShiftClockFreqModel; BoolModel m_ch4ShiftRegWidthModel; FloatModel m_ch4FreqDivRatioModel; FloatModel m_so1VolumeModel; FloatModel m_so2VolumeModel; BoolModel m_ch1So1Model; BoolModel m_ch2So1Model; BoolModel m_ch3So1Model; BoolModel m_ch4So1Model; BoolModel m_ch1So2Model; BoolModel m_ch2So2Model; BoolModel m_ch3So2Model; BoolModel m_ch4So2Model; FloatModel m_trebleModel; FloatModel m_bassModel; graphModel m_graphModel; friend class gui::FreeBoyInstrumentView; }; namespace gui { class FreeBoyInstrumentView : public InstrumentViewFixedSize { Q_OBJECT public: FreeBoyInstrumentView( Instrument * _instrument, QWidget * _parent ); ~FreeBoyInstrumentView() override = default; private: void modelChanged() override; Knob * m_ch1SweepTimeKnob; PixmapButton * m_ch1SweepDirButton; Knob * m_ch1SweepRtShiftKnob; Knob * m_ch1WavePatternDutyKnob; Knob * m_ch1VolumeKnob; PixmapButton * m_ch1VolSweepDirButton; Knob * m_ch1SweepStepLengthKnob; Knob * m_ch2WavePatternDutyKnob; Knob * m_ch2VolumeKnob; PixmapButton * m_ch2VolSweepDirButton; Knob * m_ch2SweepStepLengthKnob; Knob * m_ch3VolumeKnob; Knob * m_ch4VolumeKnob; PixmapButton * m_ch4VolSweepDirButton; Knob * m_ch4SweepStepLengthKnob; PixmapButton * m_ch4ShiftRegWidthButton; Knob * m_so1VolumeKnob; Knob * m_so2VolumeKnob; PixmapButton * m_ch1So1Button; PixmapButton * m_ch2So1Button; PixmapButton * m_ch3So1Button; PixmapButton * m_ch4So1Button; PixmapButton * m_ch1So2Button; PixmapButton * m_ch2So2Button; PixmapButton * m_ch3So2Button; PixmapButton * m_ch4So2Button; Knob * m_trebleKnob; Knob * m_bassKnob; Graph * m_graph; /*protected slots: void updateKnobHint(); void updateKnobToolTip();*/ }; } // namespace gui } // namespace lmms #endif // LMMS_FREEBOY_H
4,285
C++
.h
137
29.233577
74
0.80185
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,073
GbApuWrapper.h
LMMS_lmms/plugins/FreeBoy/GbApuWrapper.h
/* * GbApuWrapper.h - Gb_Apu subclass which allows direct buffer access * Copyright (c) 2017 Tres Finocchiaro <tres.finocchiaro/at/gmail.com> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef LMMS_GB_APU_WRAPPER_H #define LMMS_GB_APU_WRAPPER_H #include <Gb_Apu.h> #include <Multi_Buffer.h> namespace lmms { class GbApuWrapper : private Gb_Apu { public: GbApuWrapper() = default; ~GbApuWrapper() = default; blargg_err_t setSampleRate(long sampleRate, long clockRate); void writeRegister(unsigned addr, int data) { Gb_Apu::write_register(fakeClock(), addr, data); } long samplesAvail() const; long readSamples(blip_sample_t* out, long count); void trebleEq(const blip_eq_t& eq) { Gb_Apu::treble_eq(eq); } void bassFreq(int freq); void endFrame(blip_time_t endTime); private: Stereo_Buffer m_buf; // Fake CPU timing blip_time_t fakeClock() { return m_time += 4; } blip_time_t m_time = 0; }; } // namespace lmms #endif // LMMS_GB_APU_WRAPPER_H
1,718
C++
.h
48
33.854167
97
0.748041
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,074
BitInvader.h
LMMS_lmms/plugins/BitInvader/BitInvader.h
/* * BitInvader.h - declaration of class BitInvader and BSynth which * are a wavetable synthesizer * * Copyright (c) 2006-2008 Andreas Brandmaier <andy/at/brandmaier/dot/de> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef BIT_INVADER_H #define BIT_INVADER_H #include "AutomatableModel.h" #include "Instrument.h" #include "InstrumentView.h" #include "Graph.h" namespace lmms { namespace gui { class BitInvaderView; class Knob; class LedCheckBox; class PixmapButton; } class BSynth { public: BSynth( float * sample, NotePlayHandle * _nph, bool _interpolation, float factor, const sample_rate_t _sample_rate ); virtual ~BSynth(); sample_t nextStringSample( float sample_length ); private: int sample_index; float sample_realindex; float* sample_shape; NotePlayHandle* nph; const sample_rate_t sample_rate; bool interpolation; } ; class BitInvader : public Instrument { Q_OBJECT public: BitInvader(InstrumentTrack * _instrument_track ); ~BitInvader() override = default; void playNote( NotePlayHandle * _n, SampleFrame* _working_buffer ) override; void deleteNotePluginData( NotePlayHandle * _n ) override; void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; void loadSettings( const QDomElement & _this ) override; QString nodeName() const override; float desiredReleaseTimeMs() const override { return 1.5f; } gui::PluginView * instantiateView( QWidget * _parent ) override; protected slots: void lengthChanged(); void samplesChanged( int, int ); void normalize(); private: FloatModel m_sampleLength; graphModel m_graph; BoolModel m_interpolation; BoolModel m_normalize; float m_normalizeFactor; friend class gui::BitInvaderView; } ; namespace gui { class BitInvaderView : public InstrumentViewFixedSize { Q_OBJECT public: BitInvaderView( Instrument * _instrument, QWidget * _parent ); ~BitInvaderView() override = default; protected slots: //void sampleSizeChanged( float _new_sample_length ); void interpolationToggled( bool value ); void normalizeToggled( bool value ); void sinWaveClicked(); void triangleWaveClicked(); void sqrWaveClicked(); void sawWaveClicked(); void noiseWaveClicked(); void usrWaveClicked(); void smoothClicked( ); private: void modelChanged() override; Knob * m_sampleLengthKnob; PixmapButton * m_sinWaveBtn; PixmapButton * m_triangleWaveBtn; PixmapButton * m_sqrWaveBtn; PixmapButton * m_sawWaveBtn; PixmapButton * m_whiteNoiseWaveBtn; PixmapButton * m_smoothBtn; PixmapButton * m_usrWaveBtn; static QPixmap * s_artwork; Graph * m_graph; LedCheckBox * m_interpolationToggle; LedCheckBox * m_normalizeToggle; } ; } // namespace gui } // namespace lmms #endif
3,525
C++
.h
123
26.382114
73
0.768198
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,075
LOMM.h
LMMS_lmms/plugins/LOMM/LOMM.h
/* * LOMM.h * * Copyright (c) 2023 Lost Robot <r94231/at/gmail/dot/com> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef LMMS_LOMM_H #define LMMS_LOMM_H #include "LOMMControls.h" #include "Effect.h" #include "BasicFilters.h" #include "lmms_math.h" namespace lmms { constexpr inline float LOMM_MIN_FLOOR = 0.00012589f;// -72 dBFS constexpr inline float LOMM_MAX_LOOKAHEAD = 20.f; constexpr inline float LOMM_AUTO_TIME_ADJUST = 5.f; class LOMMEffect : public Effect { Q_OBJECT public: LOMMEffect(Model* parent, const Descriptor::SubPluginFeatures::Key* key); ~LOMMEffect() override = default; ProcessStatus processImpl(SampleFrame* buf, const fpp_t frames) override; EffectControls* controls() override { return &m_lommControls; } inline float msToCoeff(float ms) { return (ms == 0) ? 0 : exp(m_coeffPrecalc / ms); } private slots: void changeSampleRate(); private: LOMMControls m_lommControls; float m_sampleRate; StereoLinkwitzRiley m_lp1; StereoLinkwitzRiley m_lp2; StereoLinkwitzRiley m_hp1; StereoLinkwitzRiley m_hp2; BasicFilters<2> m_ap; bool m_needsUpdate; float m_coeffPrecalc; std::array<std::array<float, 2>, 3> m_yL; std::array<std::array<float, 2>, 3> m_rms; std::array<std::array<float, 2>, 3> m_gainResult; std::array<std::array<float, 2>, 3> m_displayIn; std::array<std::array<float, 2>, 3> m_displayOut; std::array<float, 2> m_crestPeakVal; std::array<float, 2> m_crestRmsVal; std::array<float, 2> m_crestFactorVal; float m_crestTimeConst = 0.0f; std::array<std::array<float, 2>, 3> m_prevOut; std::array<std::array<std::vector<float>, 2>, 3> m_inLookBuf; std::array<std::array<std::vector<float>, 2>, 3> m_scLookBuf; int m_lookWrite = 0; int m_lookBufLength = 0; friend class LOMMControls; friend class gui::LOMMControlDialog; }; } // namespace lmms #endif // LMMS_LOMM_H
2,624
C++
.h
80
30.525
74
0.746406
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,076
LOMMControls.h
LMMS_lmms/plugins/LOMM/LOMMControls.h
/* * LOMMControls.h * * Copyright (c) 2023 Lost Robot <r94231/at/gmail/dot/com> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef LMMS_LOMM_CONTROLS_H #define LMMS_LOMM_CONTROLS_H #include "LOMMControlDialog.h" #include "EffectControls.h" namespace lmms { class LOMMEffect; namespace gui { class LOMMControlDialog; } class LOMMControls : public EffectControls { Q_OBJECT public: LOMMControls(LOMMEffect* effect); ~LOMMControls() override = default; void saveSettings(QDomDocument & doc, QDomElement & parent) override; void loadSettings(const QDomElement & parent) override; inline QString nodeName() const override { return "LOMMControls"; } int controlCount() override { return 49; } gui::EffectControlDialog* createView() override { m_view = new gui::LOMMControlDialog(this); return m_view; } template <typename T> void setInitAndReset(AutomatableModel& model, T initValue) { model.setInitValue(initValue); model.reset(); } public slots: void resetAllParameters(); private: LOMMEffect* m_effect; gui::LOMMControlDialog* m_view; FloatModel m_depthModel; FloatModel m_timeModel; FloatModel m_inVolModel; FloatModel m_outVolModel; FloatModel m_upwardModel; FloatModel m_downwardModel; FloatModel m_split1Model; FloatModel m_split2Model; BoolModel m_split1EnabledModel; BoolModel m_split2EnabledModel; BoolModel m_band1EnabledModel; BoolModel m_band2EnabledModel; BoolModel m_band3EnabledModel; FloatModel m_inHighModel; FloatModel m_inMidModel; FloatModel m_inLowModel; FloatModel m_outHighModel; FloatModel m_outMidModel; FloatModel m_outLowModel; FloatModel m_aThreshHModel; FloatModel m_aThreshMModel; FloatModel m_aThreshLModel; FloatModel m_aRatioHModel; FloatModel m_aRatioMModel; FloatModel m_aRatioLModel; FloatModel m_bThreshHModel; FloatModel m_bThreshMModel; FloatModel m_bThreshLModel; FloatModel m_bRatioHModel; FloatModel m_bRatioMModel; FloatModel m_bRatioLModel; FloatModel m_atkHModel; FloatModel m_atkMModel; FloatModel m_atkLModel; FloatModel m_relHModel; FloatModel m_relMModel; FloatModel m_relLModel; FloatModel m_rmsTimeModel; FloatModel m_kneeModel; FloatModel m_rangeModel; FloatModel m_balanceModel; BoolModel m_depthScalingModel; BoolModel m_stereoLinkModel; FloatModel m_autoTimeModel; FloatModel m_mixModel; BoolModel m_feedbackModel; BoolModel m_midsideModel; BoolModel m_lookaheadEnableModel; FloatModel m_lookaheadModel; BoolModel m_lowSideUpwardSuppressModel; friend class gui::LOMMControlDialog; friend class LOMMEffect; }; } // namespace lmms #endif // LMMS_LOMM_CONTROLS_H
3,368
C++
.h
121
25.793388
70
0.805762
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,077
LOMMControlDialog.h
LMMS_lmms/plugins/LOMM/LOMMControlDialog.h
/* * LOMMControlDialog.h * * Copyright (c) 2023 Lost Robot <r94231/at/gmail/dot/com> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef LMMS_GUI_LOMM_CONTROL_DIALOG_H #define LMMS_GUI_LOMM_CONTROL_DIALOG_H #include "EffectControlDialog.h" #include <QMouseEvent> #include <QPainter> #include "embed.h" #include "GuiApplication.h" #include "Knob.h" #include "LcdFloatSpinBox.h" #include "LcdSpinBox.h" #include "LedCheckBox.h" #include "MainWindow.h" #include "PixmapButton.h" namespace lmms { inline constexpr float LOMM_DISPLAY_MIN = -72; inline constexpr float LOMM_DISPLAY_MAX = 0; inline constexpr float LOMM_DISPLAY_X = 125; inline constexpr float LOMM_DISPLAY_Y[6] = {24, 41, 106, 123, 186, 203}; inline constexpr float LOMM_DISPLAY_WIDTH = 150; inline constexpr float LOMM_DISPLAY_HEIGHT = 13; inline constexpr float LOMM_DISPLAY_DB_PER_PIXEL = (LOMM_DISPLAY_MAX - LOMM_DISPLAY_MIN) / LOMM_DISPLAY_WIDTH; class LOMMControls; namespace gui { class LOMMControlDialog : public EffectControlDialog { Q_OBJECT public: LOMMControlDialog(LOMMControls* controls); ~LOMMControlDialog() override = default; int dbfsToX(float dbfs); float xToDbfs(int x); Knob* createKnob(KnobType knobType, QWidget* parent, int x, int y, FloatModel* model, const QString& hintText, const QString& unit, const QString& toolTip) { Knob* knob = new Knob(knobType, parent); knob->move(x, y); knob->setModel(model); knob->setHintText(hintText, unit); knob->setToolTip(toolTip); return knob; } LcdFloatSpinBox* createLcdFloatSpinBox(int integerDigits, int decimalDigits, const QString& color, const QString& unit, QWidget* parent, int x, int y, FloatModel* model, const QString& toolTip) { LcdFloatSpinBox* spinBox = new LcdFloatSpinBox(integerDigits, decimalDigits, color, unit, parent); spinBox->move(x, y); spinBox->setModel(model); spinBox->setSeamless(true, true); spinBox->setToolTip(toolTip); return spinBox; } PixmapButton* createPixmapButton(const QString& text, QWidget* parent, int x, int y, BoolModel* model, std::string_view activeIcon, std::string_view inactiveIcon, const QString& tooltip) { PixmapButton* button = new PixmapButton(parent, text); button->move(x, y); button->setCheckable(true); if (model) { button->setModel(model); } button->setActiveGraphic(PLUGIN_NAME::getIconPixmap(activeIcon)); button->setInactiveGraphic(PLUGIN_NAME::getIconPixmap(inactiveIcon)); button->setToolTip(tooltip); return button; } protected: void paintEvent(QPaintEvent *event) override; void mousePressEvent(QMouseEvent* event) override; void mouseReleaseEvent(QMouseEvent* event) override; void mouseMoveEvent(QMouseEvent* event) override; private: LOMMControls* m_controls; QPoint m_lastMousePos; bool m_buttonPressed = false; int m_bandDrag = 0; int m_dragType = -1; PixmapButton* m_feedbackButton; PixmapButton* m_lowSideUpwardSuppressButton; private slots: void updateFeedbackVisibility(); void updateLowSideUpwardSuppressVisibility(); void updateDisplay(); }; } // namespace gui } // namespace lmms #endif // LMMS_GUI_LOMM_CONTROL_DIALOG_H
3,874
C++
.h
107
34.074766
194
0.774746
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,078
FlangerControlsDialog.h
LMMS_lmms/plugins/Flanger/FlangerControlsDialog.h
/* * flangercontrolsdialog.h - defination of FlangerControlsDialog class. * * Copyright (c) 2014 David French <dave/dot/french3/at/googlemail/dot/com> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef FLANGERCONTROLSDIALOG_H #define FLANGERCONTROLSDIALOG_H #include "EffectControlDialog.h" namespace lmms { class FlangerControls; namespace gui { class FlangerControlsDialog : public EffectControlDialog { Q_OBJECT public: FlangerControlsDialog( FlangerControls* controls ); ~FlangerControlsDialog() override = default; }; } // namespace gui } // namespace lmms #endif // FLANGERCONTROLSDIALOG_H
1,365
C++
.h
41
31.390244
75
0.78125
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,079
FlangerControls.h
LMMS_lmms/plugins/Flanger/FlangerControls.h
/* * flangercontrols.h - defination of StereoDelay class. * * Copyright (c) 2014 David French <dave/dot/french3/at/googlemail/dot/com> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef FLANGERCONTROLS_H #define FLANGERCONTROLS_H #include "EffectControls.h" #include "FlangerControlsDialog.h" namespace lmms { class FlangerEffect; class FlangerControls : public EffectControls { Q_OBJECT public: FlangerControls( FlangerEffect* effect ); ~FlangerControls() override = default; void saveSettings ( QDomDocument& doc, QDomElement& parent ) override; void loadSettings ( const QDomElement &_this ) override; inline QString nodeName() const override { return "Flanger"; } int controlCount() override { return 7; } gui::EffectControlDialog* createView() override { return new gui::FlangerControlsDialog( this ); } private slots: void changedSampleRate(); void changedPlaybackState(); private: FlangerEffect* m_effect; FloatModel m_delayTimeModel; TempoSyncKnobModel m_lfoFrequencyModel; FloatModel m_lfoAmountModel; FloatModel m_lfoPhaseModel; FloatModel m_feedbackModel; FloatModel m_whiteNoiseAmountModel; BoolModel m_invertFeedbackModel; friend class gui::FlangerControlsDialog; friend class FlangerEffect; }; } // namespace lmms #endif // FLANGERCONTROLS_H
2,055
C++
.h
67
28.671642
75
0.786835
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,080
FlangerEffect.h
LMMS_lmms/plugins/Flanger/FlangerEffect.h
/* * flangereffect.h - defination of FlangerEffect class. * * Copyright (c) 2014 David French <dave/dot/french3/at/googlemail/dot/com> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef FLANGEREFFECT_H #define FLANGEREFFECT_H #include "Effect.h" #include "FlangerControls.h" namespace lmms { class MonoDelay; class QuadratureLfo; class FlangerEffect : public Effect { public: FlangerEffect( Model* parent , const Descriptor::SubPluginFeatures::Key* key ); ~FlangerEffect() override; ProcessStatus processImpl(SampleFrame* buf, const fpp_t frames) override; EffectControls* controls() override { return &m_flangerControls; } void changeSampleRate(); void restartLFO(); private: FlangerControls m_flangerControls; MonoDelay* m_lDelay; MonoDelay* m_rDelay; QuadratureLfo* m_lfo; }; } // namespace lmms #endif // FLANGEREFFECT_H
1,606
C++
.h
51
29.529412
80
0.773022
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,081
MonoDelay.h
LMMS_lmms/plugins/Flanger/MonoDelay.h
/* * monodelay.h - defination of MonoDelay class. * * Copyright (c) 2014 David French <dave/dot/french3/at/googlemail/dot/com> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef MONODELAY_H #define MONODELAY_H #include "lmms_basics.h" namespace lmms { class MonoDelay { public: MonoDelay( int maxTime , int sampleRate ); ~MonoDelay(); inline void setLength( float length ) { if( length <= m_maxLength && length >= 0 ) { m_length = length; } } inline void setFeedback( float feedback ) { m_feedback = feedback; } void tick( sample_t* sample ); void setSampleRate( int sampleRate ); private: sample_t* m_buffer; int m_maxLength; float m_length; int m_writeIndex; float m_feedback; float m_maxTime; }; } // namespace lmms #endif // MONODELAY_H
1,533
C++
.h
56
25.303571
75
0.740791
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
true
false
false
false
false
false
false
20,082
DynamicsProcessorControls.h
LMMS_lmms/plugins/DynamicsProcessor/DynamicsProcessorControls.h
/* * DynamicsProcessorControls.h - controls for DynamicsProcessor-effect * * Copyright (c) 2014 Vesa Kivim√§ki <contact/dot/diizy/at/nbl/dot/fi> * Copyright (c) 2008 Tobias Doerffel <tobydox/at/users.sourceforge.net> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef DYNPROC_CONTROLS_H #define DYNPROC_CONTROLS_H #include "EffectControls.h" #include "DynamicsProcessorControlDialog.h" #include "Graph.h" namespace lmms { class DynProcEffect; class DynProcControls : public EffectControls { Q_OBJECT public: enum class StereoMode { Maximum, Average, Unlinked }; DynProcControls( DynProcEffect * _eff ); ~DynProcControls() override = default; void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; void loadSettings( const QDomElement & _this ) override; inline QString nodeName() const override { return( "dynamicsprocessor_controls" ); } virtual void setDefaultShape(); int controlCount() override { return( 6 ); } gui::EffectControlDialog * createView() override { return( new gui::DynProcControlDialog( this ) ); } private slots: void samplesChanged( int, int ); void sampleRateChanged(); void resetClicked(); void smoothClicked(); void addOneClicked(); void subOneClicked(); private: DynProcEffect * m_effect; FloatModel m_inputModel; FloatModel m_outputModel; FloatModel m_attackModel; FloatModel m_releaseModel; graphModel m_wavegraphModel; IntModel m_stereomodeModel; friend class gui::DynProcControlDialog; friend class DynProcEffect; } ; } // namespace lmms #endif
2,316
C++
.h
79
27.164557
74
0.774164
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,083
DynamicsProcessor.h
LMMS_lmms/plugins/DynamicsProcessor/DynamicsProcessor.h
/* * DynamicsProcessor.h - DynamicsProcessor effect-plugin * * Copyright (c) 2014 Vesa Kivim√§ki <contact/dot/diizy/at/nbl/dot/fi> * Copyright (c) 2006-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef DYNPROC_H #define DYNPROC_H #include "Effect.h" #include "DynamicsProcessorControls.h" namespace lmms { class RmsHelper; class DynProcEffect : public Effect { public: DynProcEffect( Model * _parent, const Descriptor::SubPluginFeatures::Key * _key ); ~DynProcEffect() override; ProcessStatus processImpl(SampleFrame* buf, const fpp_t frames) override; void processBypassedImpl() override; EffectControls * controls() override { return( &m_dpControls ); } private: void calcAttack(); void calcRelease(); DynProcControls m_dpControls; // this member array is needed for peak detection float m_currentPeak[2]; double m_attCoeff; double m_relCoeff; bool m_needsUpdate; RmsHelper * m_rms [2]; friend class DynProcControls; } ; } // namespace lmms #endif
1,806
C++
.h
57
29.508772
77
0.766647
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,084
DynamicsProcessorControlDialog.h
LMMS_lmms/plugins/DynamicsProcessor/DynamicsProcessorControlDialog.h
/* * DynamicsProcessorControlDialog.h - control-dialog for DynamicsProcessor-effect * * * Copyright (c) 2014 Vesa Kivim√§ki <contact/dot/diizy/at/nbl/dot/fi> * Copyright (c) 2006-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef DYNPROC_CONTROL_DIALOG_H #define DYNPROC_CONTROL_DIALOG_H #include "EffectControlDialog.h" namespace lmms { class DynProcControls; namespace gui { class DynProcControlDialog : public EffectControlDialog { Q_OBJECT public: DynProcControlDialog( DynProcControls * _controls ); ~DynProcControlDialog() override = default; private: } ; } // namespace gui } // namespace lmms #endif
1,437
C++
.h
43
31.465116
81
0.774474
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,085
CompressorControlDialog.h
LMMS_lmms/plugins/Compressor/CompressorControlDialog.h
/* * CompressorControlDialog.h * * Copyright (c) 2020 Lost Robot <r94231@gmail.com> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef COMPRESSOR_CONTROL_DIALOG_H #define COMPRESSOR_CONTROL_DIALOG_H #include <QBasicTimer> #include <QElapsedTimer> #include <QPainter> #include "EffectControlDialog.h" class QLabel; namespace lmms { constexpr float COMP_NOISE_FLOOR = 0.000001f;// -120 dbFs class CompressorControls; namespace gui { constexpr int COMP_MILLI_PER_PIXEL = 6; constexpr int MIN_COMP_SCREEN_X = 800; constexpr int MIN_COMP_SCREEN_Y = 360; constexpr int MAX_COMP_SCREEN_X = 1920; constexpr int MAX_COMP_SCREEN_Y = 1080; constexpr int COMP_SCREEN_X = 800; constexpr int COMP_SCREEN_Y = 560; constexpr int KNEE_SCREEN_X = COMP_SCREEN_Y; constexpr int KNEE_SCREEN_Y = COMP_SCREEN_Y; constexpr int COMP_KNEE_LINES = 20; constexpr int COMP_BOX_X = 720; constexpr int COMP_BOX_Y = 280; constexpr float COMP_GRID_SPACING = 3.f;// 3 db per grid line constexpr float COMP_GRID_MAX = 96.f;// Can't zoom out past 96 db class automatableButtonGroup; class Knob; class PixmapButton; class EqFader; class CompressorControlDialog : public EffectControlDialog { Q_OBJECT public: CompressorControlDialog(CompressorControls* controls); bool isResizable() const override {return true;} QSize sizeHint() const override {return QSize(COMP_SCREEN_X, COMP_SCREEN_Y);} // For theming purposes Q_PROPERTY(QColor inVolAreaColor MEMBER m_inVolAreaColor) Q_PROPERTY(QColor inVolColor MEMBER m_inVolColor) Q_PROPERTY(QColor outVolAreaColor MEMBER m_outVolAreaColor) Q_PROPERTY(QColor outVolColor MEMBER m_outVolColor) Q_PROPERTY(QColor gainReductionColor MEMBER m_gainReductionColor) Q_PROPERTY(QColor kneeColor MEMBER m_kneeColor) Q_PROPERTY(QColor kneeColor2 MEMBER m_kneeColor2) Q_PROPERTY(QColor threshColor MEMBER m_threshColor) Q_PROPERTY(QColor textColor MEMBER m_textColor) Q_PROPERTY(QColor graphColor MEMBER m_graphColor) Q_PROPERTY(QColor resetColor MEMBER m_resetColor) Q_PROPERTY(QColor backgroundColor MEMBER m_backgroundColor) protected: void resizeEvent(QResizeEvent *event) override; void paintEvent(QPaintEvent *event) override; void wheelEvent(QWheelEvent *event) override; private slots: void updateDisplay(); void peakmodeChanged(); void stereoLinkChanged(); void lookaheadChanged(); void limiterChanged(); private: void makeLargeKnob(Knob * knob, QString hint, QString unit); void makeSmallKnob(Knob * knob, QString hint, QString unit); void resetCompressorView(); void drawVisPixmap(); void redrawKnee(); void drawKneePixmap2(); void drawMiscPixmap(); void drawGraph(); void mouseDoubleClickEvent(QMouseEvent* event) override; void setGuiVisibility(bool isVisible); QPainter m_p; QBasicTimer m_updateTimer; CompressorControls * m_controls; inline int dbfsToYPoint(float inDbfs); inline int dbfsToXPoint(float inDbfs); QPixmap m_visPixmap = QPixmap(MAX_COMP_SCREEN_X, MAX_COMP_SCREEN_Y); QPixmap m_kneePixmap = QPixmap(MAX_COMP_SCREEN_X, MAX_COMP_SCREEN_Y); QPixmap m_kneePixmap2 = QPixmap(MAX_COMP_SCREEN_X, MAX_COMP_SCREEN_Y); QPixmap m_miscPixmap = QPixmap(MAX_COMP_SCREEN_X, MAX_COMP_SCREEN_Y); QPixmap m_graphPixmap = QPixmap(MAX_COMP_SCREEN_X, MAX_COMP_SCREEN_Y); int m_lastPoint; int m_lastGainPoint; int m_lastKneePoint = 0; int m_windowSizeX = size().width(); int m_windowSizeY = size().height(); int m_kneeWindowSizeX = m_windowSizeY; int m_kneeWindowSizeY = m_windowSizeY; int m_controlsBoxX = 0; int m_controlsBoxY = 0; float m_dbRange = 36; QColor m_inVolAreaColor = QColor(209, 216, 228, 17); QColor m_inVolColor = QColor(209, 216, 228, 100); QColor m_outVolAreaColor = QColor(209, 216, 228, 30); QColor m_outVolColor = QColor(209, 216, 228, 240); QColor m_gainReductionColor = QColor(180, 100, 100, 210); QColor m_kneeColor = QColor(39, 171, 95, 255); QColor m_kneeColor2 = QColor(9, 171, 160, 255); QColor m_threshColor = QColor(39, 171, 95, 100); QColor m_textColor = QColor(209, 216, 228, 50); QColor m_graphColor = QColor(209, 216, 228, 50); QColor m_resetColor = QColor(200, 100, 15, 200); QColor m_backgroundColor = QColor(7, 8, 9, 255); float m_peakAvg; float m_gainAvg; float m_yPoint; float m_yGainPoint; int m_threshYPoint; int m_threshXPoint; int m_compPixelMovement; QLabel * m_controlsBoxLabel; QLabel * m_rmsEnabledLabel; QLabel * m_blendEnabledLabel; QLabel * m_lookaheadEnabledLabel; QLabel * m_ratioEnabledLabel; Knob * m_thresholdKnob; Knob * m_ratioKnob; Knob * m_attackKnob; Knob * m_releaseKnob; Knob * m_kneeKnob; Knob * m_rangeKnob; Knob * m_lookaheadLengthKnob; Knob * m_holdKnob; Knob * m_rmsKnob; Knob * m_inBalanceKnob; Knob * m_outBalanceKnob; Knob * m_stereoBalanceKnob; Knob * m_blendKnob; Knob * m_tiltKnob; Knob * m_tiltFreqKnob; Knob * m_mixKnob; Knob * m_autoAttackKnob; Knob * m_autoReleaseKnob; EqFader * m_outFader; EqFader * m_inFader; PixmapButton * rmsButton; PixmapButton * peakButton; automatableButtonGroup * rmsPeakGroup; PixmapButton * leftRightButton; PixmapButton * midSideButton; automatableButtonGroup * leftRightMidSideGroup; PixmapButton * compressButton; PixmapButton * limitButton; automatableButtonGroup * compressLimitGroup; PixmapButton * unlinkedButton; PixmapButton * maximumButton; PixmapButton * averageButton; PixmapButton * minimumButton; PixmapButton * blendButton; automatableButtonGroup * stereoLinkGroup; PixmapButton * autoMakeupButton; PixmapButton * auditionButton; PixmapButton * feedbackButton; PixmapButton * lookaheadButton; bool m_guiVisibility = true; QElapsedTimer m_timeElapsed; int m_timeSinceLastUpdate = 0; friend class CompressorControls; } ; } // namespace gui } // namespace lmms #endif
6,512
C++
.h
186
32.973118
78
0.783177
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,086
Compressor.h
LMMS_lmms/plugins/Compressor/Compressor.h
/* * Compressor.h * * Copyright (c) 2020 Lost Robot <r94231@gmail.com> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef COMPRESSOR_H #define COMPRESSOR_H #include "CompressorControls.h" #include "Effect.h" namespace lmms { constexpr float COMP_LOG = -2.2f; class CompressorEffect : public Effect { Q_OBJECT public: CompressorEffect(Model* parent, const Descriptor::SubPluginFeatures::Key* key); ~CompressorEffect() override = default; ProcessStatus processImpl(SampleFrame* buf, const fpp_t frames) override; void processBypassedImpl() override; EffectControls* controls() override { return &m_compressorControls; } private slots: void calcAutoMakeup(); void calcAttack(); void calcRelease(); void calcAutoAttack(); void calcAutoRelease(); void calcHold(); void calcOutGain(); void calcRatio(); void calcRange(); void resizeRMS(); void calcLookaheadLength(); void calcThreshold(); void calcKnee(); void calcInGain(); void calcTiltCoeffs(); void calcMix(); void changeSampleRate(); void redrawKnee(); private: CompressorControls m_compressorControls; float msToCoeff(float ms); inline void calcTiltFilter(sample_t inputSample, sample_t &outputSample, int filtNum); inline int realmod(int k, int n); inline float realfmod(float k, float n); enum class StereoLinkMode { Unlinked, Maximum, Average, Minimum, Blend }; std::array<std::vector<float>, 2> m_inLookBuf; std::array<std::vector<float>, 2> m_scLookBuf; int m_lookWrite; int m_lookBufLength; float m_attCoeff; float m_relCoeff; float m_autoAttVal; float m_autoRelVal; int m_holdLength = 0; int m_holdTimer[2] = {0, 0}; int m_lookaheadLength; float m_thresholdAmpVal; float m_autoMakeupVal; float m_outGainVal; float m_inGainVal; float m_rangeVal; float m_tiltVal; float m_mixVal; float m_coeffPrecalc; SampleFrame m_maxLookaheadVal; int m_maxLookaheadTimer[2] = {1, 1}; float m_rmsTimeConst; float m_rmsVal[2] = {0, 0}; float m_crestPeakVal[2] = {0, 0}; float m_crestRmsVal[2] = {0, 0}; float m_crestFactorVal[2] = {0, 0}; float m_crestTimeConst; float m_tiltOut[2] = {0}; bool m_cleanedBuffers = false; float m_sampleRate; float m_lgain; float m_hgain; float m_a0; float m_b1; float m_prevOut[2] = {0}; float m_yL[2]; float m_gainResult[2]; float m_displayPeak[2]; float m_displayGain[2]; float m_kneeVal; float m_thresholdVal; float m_ratioVal; bool m_redrawKnee = true; bool m_redrawThreshold = true; friend class CompressorControls; friend class gui::CompressorControlDialog; } ; } // namespace lmms #endif
3,338
C++
.h
117
26.333333
87
0.758718
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,087
CompressorControls.h
LMMS_lmms/plugins/Compressor/CompressorControls.h
/* * CompressorControls.h * * Copyright (c) 2020 Lost Robot <r94231@gmail.com> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef COMPRESSOR_CONTROLS_H #define COMPRESSOR_CONTROLS_H #include "CompressorControlDialog.h" #include "EffectControls.h" namespace lmms { class CompressorEffect; class CompressorControls : public EffectControls { Q_OBJECT public: CompressorControls(CompressorEffect* effect); void saveSettings(QDomDocument & _doc, QDomElement & _parent) override; void loadSettings(const QDomElement & _this) override; inline QString nodeName() const override { return "CompressorControls"; } int controlCount() override { return 28; } gui::EffectControlDialog* createView() override { return new gui::CompressorControlDialog(this); } private: CompressorEffect * m_effect; FloatModel m_thresholdModel; FloatModel m_ratioModel; FloatModel m_attackModel; FloatModel m_releaseModel; FloatModel m_kneeModel; FloatModel m_holdModel; FloatModel m_rangeModel; FloatModel m_rmsModel; IntModel m_midsideModel; IntModel m_peakmodeModel; FloatModel m_lookaheadLengthModel; FloatModel m_inBalanceModel; FloatModel m_outBalanceModel; IntModel m_limiterModel; FloatModel m_outGainModel; FloatModel m_inGainModel; FloatModel m_blendModel; FloatModel m_stereoBalanceModel; BoolModel m_autoMakeupModel; BoolModel m_auditionModel; BoolModel m_feedbackModel; FloatModel m_autoAttackModel; FloatModel m_autoReleaseModel; BoolModel m_lookaheadModel; FloatModel m_tiltModel; FloatModel m_tiltFreqModel; IntModel m_stereoLinkModel; FloatModel m_mixModel; float m_inPeakL; float m_inPeakR; float m_outPeakL; float m_outPeakR; friend class gui::CompressorControlDialog; friend class CompressorEffect; } ; } // namespace lmms #endif
2,543
C++
.h
88
26.829545
72
0.801805
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,088
VstPlugin.h
LMMS_lmms/plugins/VstBase/VstPlugin.h
/* * VstPlugin.h - declaration of VstPlugin class * * Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef _VST_PLUGIN_H #define _VST_PLUGIN_H #include <QMap> #include <QPointer> #include <QSize> #include <QString> #include <QTimer> #include "JournallingObject.h" #include "RemotePlugin.h" #include "vstbase_export.h" namespace lmms { class VSTBASE_EXPORT VstPlugin : public RemotePlugin, public JournallingObject { Q_OBJECT public: VstPlugin( const QString & _plugin ); ~VstPlugin() override; void tryLoad( const QString &remoteVstPluginExecutable ); bool processMessage( const message & _m ) override; inline bool hasEditor() const { return m_pluginWindowID != 0; } /// Same as pluginWidget(), but can be overwritten in sub-classes to modify /// behavior the UI. This is used in VstInstrumentPlugin to wrap the VST UI /// in a QMdiSubWindow virtual QWidget* editor(); inline const QString & name() const { return m_name; } inline int version() const { return m_version; } inline const QString & vendorString() const { return m_vendorString; } inline const QString & productString() const { return m_productString; } inline const QString& currentProgramName() const { return m_currentProgramName; } inline const QString& allProgramNames() const { return m_allProgramNames; } inline const QString& allParameterLabels() const { return m_allParameterLabels; } inline const QString& allParameterDisplays() const { return m_allParameterDisplays; } int currentProgram(); const QMap<QString, QString> & parameterDump(); void setParameterDump( const QMap<QString, QString> & _pdump ); QWidget * pluginWidget(); void loadSettings( const QDomElement & _this ) override; void saveSettings( QDomDocument & _doc, QDomElement & _this ) override; QString nodeName() const override { return "vstplugin"; } virtual void createUI(QWidget *parent); bool eventFilter(QObject *obj, QEvent *event) override; QString embedMethod() const; public slots: void setTempo( lmms::bpm_t _bpm ); void updateSampleRate(); void openPreset(); void setProgram( int index ); void rotateProgram( int offset ); void loadProgramNames(); void loadParameterLabels(); void loadParameterDisplays(); void savePreset(); void setParam( int i, float f ); void idleUpdate(); void showUI() override; void hideUI() override; void toggleUI() override; void handleClientEmbed(); private: void loadChunk( const QByteArray & _chunk ); QByteArray saveChunk(); void toggleEditorVisibility(int visible = -1); QString m_plugin; QPointer<QWidget> m_pluginWidget; int m_pluginWindowID; QSize m_pluginGeometry; const QString m_embedMethod; QString m_name; int m_version; QString m_vendorString; QString m_productString; QString m_currentProgramName; QString m_allProgramNames; QString m_allParameterLabels; QString m_allParameterDisplays; QString p_name; QMap<QString, QString> m_parameterDump; int m_currentProgram; QTimer m_idleTimer; } ; } // namespace lmms #endif
3,881
C++
.h
136
26.294118
78
0.768711
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,089
communication.h
LMMS_lmms/plugins/VstBase/communication.h
/* * communication.h - header file defining stuff concerning communication between * LVSL-server and -client * * Copyright (c) 2005-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef _COMMUNICATION_H #define _COMMUNICATION_H namespace lmms { struct VstParameterDumpItem { int32_t index; std::string shortLabel; float value; } ; enum class VstHostLanguage { English = 1, German, French, Italian, Spanish, Japanese, Korean } ; enum VstRemoteMessageIDs { // vstPlugin -> remoteVstPlugin IdVstLoadPlugin = RemoteMessageIDs::IdUserBase, IdVstClosePlugin, IdVstSetTempo, IdVstSetLanguage, IdVstGetParameterCount, IdVstGetParameterDump, IdVstSetParameterDump, IdVstProgramNames, IdVstCurrentProgram, IdVstCurrentProgramName, IdVstSetProgram, IdVstRotateProgram, IdVstIdleUpdate, IdVstParameterDisplays, IdVstParameterLabels, // remoteVstPlugin -> vstPlugin IdVstFailedLoadingPlugin, IdVstPluginWindowID, IdVstPluginEditorGeometry, IdVstPluginName, IdVstPluginVersion, IdVstPluginVendorString, IdVstPluginProductString, IdVstPluginPresetsString, IdVstPluginUniqueID, IdVstSetParameter, IdVstParameterCount, IdVstParameterDump } ; } // namespace lmms #endif
2,034
C++
.h
78
24.064103
80
0.801031
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
true
false
false
false
false
false
false
20,090
ExprSynth.h
LMMS_lmms/plugins/Xpressive/ExprSynth.h
/* * exprfront.h - header file to a Frontend to ExprTk * * Copyright (c) 2016-2017 Orr Dvori * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef EXPRSYNTH_H #define EXPRSYNTH_H #include <cmath> #include <cstddef> #include <limits> #include "AutomatableModel.h" #include "Graph.h" namespace lmms { class ExprFrontData; class NotePlayHandle; class SampleFrame; namespace gui { class automatableButtonGroup; class Knob; class LedCheckBox; class PixmapButton; } class ExprFront { public: using ff1data_functor = float (*)(void*, float); ExprFront(const char* expr, int last_func_samples); ~ExprFront(); bool compile(); inline bool isValid() { return m_valid; } float evaluate(); bool add_variable(const char* name, float & ref); bool add_constant(const char* name, float ref); bool add_cyclic_vector(const char* name, const float* data, size_t length, bool interp = false); void setIntegrate(const unsigned int* frameCounter, unsigned int sample_rate); ExprFrontData* getData() { return m_data; } private: ExprFrontData *m_data; bool m_valid; static const int max_float_integer_mask=(1<<(std::numeric_limits<float>::digits))-1; }; class WaveSample { public: WaveSample(int length) { m_length = length; m_samples = new float[m_length]; for(int i = 0 ; i < m_length ; ++i) m_samples[i] = 0; } WaveSample(const graphModel * graph) { m_length = graph->length(); m_samples = new float[m_length]; memcpy(m_samples, graph->samples(), m_length * sizeof(float)); } inline void copyFrom(const graphModel * graph) { memcpy(m_samples, graph->samples(), m_length * sizeof(float)); } ~WaveSample() { delete [] m_samples; } inline void setInterpolate(bool _interpolate) { m_interpolate = _interpolate; } float *m_samples; int m_length; bool m_interpolate; }; class ExprSynth { public: ExprSynth(const WaveSample* gW1, const WaveSample* gW2, const WaveSample* gW3, ExprFront* exprO1, ExprFront* exprO2, NotePlayHandle* nph, const sample_rate_t sample_rate, const FloatModel* pan1, const FloatModel* pan2, float rel_trans); virtual ~ExprSynth(); void renderOutput(fpp_t frames, SampleFrame* buf ); private: ExprFront *m_exprO1, *m_exprO2; const WaveSample *m_W1, *m_W2, *m_W3; unsigned int m_note_sample; unsigned int m_note_rel_sample; float m_note_sample_sec; float m_note_rel_sec; float m_frequency; float m_released; NotePlayHandle* m_nph; const sample_rate_t m_sample_rate; const FloatModel *m_pan1,*m_pan2; float m_rel_transition; float m_rel_inc; } ; inline float positiveFraction(float x) { if (std::isnan(x) || std::isinf(x)) return 0; if (x<0) { x+=static_cast<int>(1-x); } return x-static_cast<int>(x); } template <typename T> inline void clearArray(T* arr,unsigned int size) { const T* const arr_end = arr + size; while(arr < arr_end) { *arr=0; ++arr; } } } // namespace lmms #endif
3,637
C++
.h
134
25.164179
138
0.738718
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,091
Xpressive.h
LMMS_lmms/plugins/Xpressive/Xpressive.h
/* * Xpressive.h - Instrument which uses a mathematical formula parser * * Copyright (c) 2016-2017 Orr Dvori * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef XPRESSIVE_H #define XPRESSIVE_H #include <QTextEdit> #include "Graph.h" #include "Instrument.h" #include "InstrumentView.h" #include "ExprSynth.h" class QPlainTextEdit; namespace lmms { class oscillator; const int W1_EXPR = 0; const int W2_EXPR = 1; const int W3_EXPR = 2; const int O1_EXPR = 3; const int O2_EXPR = 4; const int NUM_EXPRS = 5; class ExprFront; namespace gui { class SubWindow; class XpressiveView; } class Xpressive : public Instrument { Q_OBJECT public: Xpressive(InstrumentTrack* instrument_track ); void playNote(NotePlayHandle* nph, SampleFrame* working_buffer ) override; void deleteNotePluginData( NotePlayHandle* nph ) override; void saveSettings( QDomDocument& _doc, QDomElement& _this ) override; void loadSettings( const QDomElement& _this ) override; QString nodeName() const override; gui::PluginView* instantiateView( QWidget * parent ) override; graphModel& graphO1() { return m_graphO1; } graphModel& graphO2() { return m_graphO2; } graphModel& graphW1() { return m_graphW1; } graphModel& graphW2() { return m_graphW2; } graphModel& graphW3() { return m_graphW3; } graphModel& rawgraphW1() { return m_rawgraphW1; } graphModel& rawgraphW2() { return m_rawgraphW2; } graphModel& rawgraphW3() { return m_rawgraphW3; } IntModel& selectedGraph() { return m_selectedGraph; } QByteArray& wavesExpression(int i) { return m_wavesExpression[i]; } QByteArray& outputExpression(int i) { return m_outputExpression[i]; } FloatModel& parameterA1() { return m_parameterA1; } FloatModel& parameterA2() { return m_parameterA2; } FloatModel& parameterA3() { return m_parameterA3; } FloatModel& smoothW1() { return m_smoothW1; } FloatModel& smoothW2() { return m_smoothW2; } FloatModel& smoothW3() { return m_smoothW3; } BoolModel& interpolateW1() { return m_interpolateW1; } BoolModel& interpolateW2() { return m_interpolateW2; } BoolModel& interpolateW3() { return m_interpolateW3; } FloatModel& panning1() { return m_panning1; } FloatModel& panning2() { return m_panning2; } FloatModel& relTransition() { return m_relTransition; } WaveSample& W1() { return m_W1; } WaveSample& W2() { return m_W2; } WaveSample& W3() { return m_W3; } BoolModel& exprValid() { return m_exprValid; } static void smooth(float smoothness,const graphModel* in,graphModel* out); protected: protected slots: private: graphModel m_graphO1; graphModel m_graphO2; graphModel m_graphW1; graphModel m_graphW2; graphModel m_graphW3; graphModel m_rawgraphW1; graphModel m_rawgraphW2; graphModel m_rawgraphW3; IntModel m_selectedGraph; QByteArray m_wavesExpression[3]; QByteArray m_outputExpression[2]; FloatModel m_parameterA1; FloatModel m_parameterA2; FloatModel m_parameterA3; FloatModel m_smoothW1; FloatModel m_smoothW2; FloatModel m_smoothW3; BoolModel m_interpolateW1; BoolModel m_interpolateW2; BoolModel m_interpolateW3; FloatModel m_panning1; FloatModel m_panning2; FloatModel m_relTransition; float m_A1,m_A2,m_A3; WaveSample m_W1, m_W2, m_W3; BoolModel m_exprValid; } ; namespace gui { class XpressiveView : public InstrumentViewFixedSize { Q_OBJECT public: XpressiveView( Instrument* _instrument, QWidget* _parent ); protected: protected slots: void updateLayout(); void sinWaveClicked(); void triangleWaveClicked(); void sqrWaveClicked(); void sawWaveClicked(); void noiseWaveClicked(); void moogSawWaveClicked(); void expWaveClicked(); void usrWaveClicked(); void helpClicked(); void expressionChanged(); void smoothChanged(); void graphDrawn(); private: void modelChanged() override; Knob *m_generalPurposeKnob[3]; Knob *m_panningKnob[2]; Knob *m_relKnob; Knob *m_smoothKnob; QPlainTextEdit * m_expressionEditor; automatableButtonGroup *m_selectedGraphGroup; PixmapButton *m_w1Btn; PixmapButton *m_w2Btn; PixmapButton *m_w3Btn; PixmapButton *m_o1Btn; PixmapButton *m_o2Btn; PixmapButton *m_helpBtn; PixmapButton *m_sinWaveBtn; PixmapButton *m_triangleWaveBtn; PixmapButton *m_sqrWaveBtn; PixmapButton *m_sawWaveBtn; PixmapButton *m_whiteNoiseWaveBtn; PixmapButton *m_usrWaveBtn; PixmapButton *m_moogWaveBtn; PixmapButton *m_expWaveBtn; static QPixmap *s_artwork; Graph *m_graph; graphModel *m_raw_graph; LedCheckBox *m_expressionValidToggle; LedCheckBox *m_waveInterpolate; bool m_output_expr; bool m_wave_expr; } ; class XpressiveHelpView: public QTextEdit { Q_OBJECT public: static XpressiveHelpView* getInstance() { static XpressiveHelpView instance; return &instance; } static void finalize() { } private: XpressiveHelpView(); static QString s_helpText; }; } // namespace gui } // namespace lmms #endif
5,614
C++
.h
189
27.603175
75
0.772693
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,092
SidInstrument.h
LMMS_lmms/plugins/Sid/SidInstrument.h
/* * SidInstrument.h - ResID based software-synthesizer * * Copyright (c) 2008 Csaba Hruska <csaba.hruska/at/gmail.com> * Attila Herman <attila589/at/gmail.com> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef _SID_H #define _SID_H #include "AutomatableModel.h" #include "Instrument.h" #include "InstrumentView.h" namespace lmms { class NotePlayHandle; namespace gui { class Knob; class automatableButtonGroup; class SidInstrumentView; class PixmapButton; } class VoiceObject : public Model { Q_OBJECT public: enum class WaveForm { Square = 0, Triangle, Saw, Noise, Count }; constexpr static auto NumWaveShapes = static_cast<std::size_t>(WaveForm::Count); VoiceObject( Model * _parent, int _idx ); ~VoiceObject() override = default; private: FloatModel m_pulseWidthModel; FloatModel m_attackModel; FloatModel m_decayModel; FloatModel m_sustainModel; FloatModel m_releaseModel; FloatModel m_coarseModel; IntModel m_waveFormModel; BoolModel m_syncModel; BoolModel m_ringModModel; BoolModel m_filteredModel; BoolModel m_testModel; friend class SidInstrument; friend class gui::SidInstrumentView; } ; class SidInstrument : public Instrument { Q_OBJECT public: enum class FilterType { HighPass = 0, BandPass, LowPass, Count }; constexpr static auto NumFilterTypes = static_cast<std::size_t>(FilterType::Count); enum class ChipModel { MOS6581 = 0, MOS8580, Count }; constexpr static auto NumChipModels = static_cast<std::size_t>(ChipModel::Count); SidInstrument( InstrumentTrack * _instrument_track ); ~SidInstrument() override = default; void playNote( NotePlayHandle * _n, SampleFrame* _working_buffer ) override; void deleteNotePluginData( NotePlayHandle * _n ) override; void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; void loadSettings( const QDomElement & _this ) override; QString nodeName() const override; float desiredReleaseTimeMs() const override; gui::PluginView* instantiateView( QWidget * _parent ) override; /*public slots: void updateKnobHint(); void updateKnobToolTip();*/ private: // voices VoiceObject * m_voice[3]; // filter FloatModel m_filterFCModel; FloatModel m_filterResonanceModel; IntModel m_filterModeModel; // misc BoolModel m_voice3OffModel; FloatModel m_volumeModel; IntModel m_chipModel; friend class gui::SidInstrumentView; } ; namespace gui { class SidInstrumentView : public InstrumentViewFixedSize { Q_OBJECT public: SidInstrumentView( Instrument * _instrument, QWidget * _parent ); ~SidInstrumentView() override = default; private: void modelChanged() override; automatableButtonGroup * m_passBtnGrp; automatableButtonGroup * m_sidTypeBtnGrp; struct voiceKnobs { voiceKnobs( Knob * a, Knob * d, Knob * s, Knob * r, Knob * pw, Knob * crs, automatableButtonGroup * wfbg, PixmapButton * syncb, PixmapButton * ringb, PixmapButton * filterb, PixmapButton * testb ) : m_attKnob( a ), m_decKnob( d ), m_sustKnob( s ), m_relKnob( r ), m_pwKnob( pw ), m_crsKnob( crs ), m_waveFormBtnGrp( wfbg ), m_syncButton( syncb ), m_ringModButton( ringb ), m_filterButton( filterb ), m_testButton( testb ) { } voiceKnobs() = default; Knob * m_attKnob; Knob * m_decKnob; Knob * m_sustKnob; Knob * m_relKnob; Knob * m_pwKnob; Knob * m_crsKnob; automatableButtonGroup * m_waveFormBtnGrp; PixmapButton * m_syncButton; PixmapButton * m_ringModButton; PixmapButton * m_filterButton; PixmapButton * m_testButton; } ; voiceKnobs m_voiceKnobs[3]; Knob * m_volKnob; Knob * m_resKnob; Knob * m_cutKnob; PixmapButton * m_offButton; protected slots: void updateKnobHint(); void updateKnobToolTip(); } ; } // namespace gui } // namespace lmms #endif
4,604
C++
.h
174
23.862069
84
0.747947
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,093
revsc.h
LMMS_lmms/plugins/ReverbSC/revsc.h
typedef struct { int writePos; int bufferSize; int readPos; int readPosFrac; int readPosFrac_inc; int dummy; int seedVal; int randLine_cnt; SPFLOAT filterState; SPFLOAT *buf; } sp_revsc_dl; typedef struct { SPFLOAT feedback, lpfreq; SPFLOAT iSampleRate, iPitchMod, iSkipInit; SPFLOAT sampleRate; SPFLOAT dampFact; SPFLOAT prv_LPFreq; int initDone; sp_revsc_dl delayLines[8]; sp_auxdata aux; } sp_revsc; int sp_revsc_create(sp_revsc **p); int sp_revsc_destroy(sp_revsc **p); int sp_revsc_init(sp_data *sp, sp_revsc *p); int sp_revsc_compute(sp_data *sp, sp_revsc *p, SPFLOAT *in1, SPFLOAT *in2, SPFLOAT *out1, SPFLOAT *out2);
700
C++
.h
26
23.076923
105
0.697917
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
true
true
false
false
false
false
false
false
20,094
base.h
LMMS_lmms/plugins/ReverbSC/base.h
#include <stdint.h> #include <stdio.h> #define NO_LIBSNDFILE #ifndef NO_LIBSNDFILE #include "sndfile.h" #endif #define SP_BUFSIZE 4096 #ifndef SPFLOAT #define SPFLOAT float #endif #define SP_OK 1 #define SP_NOT_OK 0 #define SP_RANDMAX 2147483648 typedef unsigned long sp_frame; typedef struct sp_auxdata { size_t size; void *ptr; } sp_auxdata; typedef struct sp_data { SPFLOAT *out; uint32_t sr; int nchan; unsigned long len; unsigned long pos; char filename[200]; uint32_t rand; } sp_data; typedef struct { char state; SPFLOAT val; } sp_param; int sp_auxdata_alloc(sp_auxdata *aux, size_t size); int sp_auxdata_free(sp_auxdata *aux); int sp_create(sp_data **spp); int sp_createn(sp_data **spp, int nchan); int sp_destroy(sp_data **spp); int sp_process(sp_data *sp, void *ud, void (*callback)(sp_data *, void *)); int sp_process_raw(sp_data *sp, void *ud, void (*callback)(sp_data *, void *)); int sp_process_plot(sp_data *sp, void *ud, void (*callback)(sp_data *, void *)); int sp_process_spa(sp_data *sp, void *ud, void (*callback)(sp_data *, void *)); SPFLOAT sp_midi2cps(SPFLOAT nn); int sp_set(sp_param *p, SPFLOAT val); int sp_out(sp_data *sp, uint32_t chan, SPFLOAT val); uint32_t sp_rand(sp_data *sp); void sp_srand(sp_data *sp, uint32_t val); typedef struct { SPFLOAT *utbl; int16_t *BRLow; int16_t *BRLowCpx; } sp_fft; void sp_fft_create(sp_fft **fft); void sp_fft_init(sp_fft *fft, int M); void sp_fftr(sp_fft *fft, SPFLOAT *buf, int FFTsize); void sp_fft_cpx(sp_fft *fft, SPFLOAT *buf, int FFTsize); void sp_ifftr(sp_fft *fft, SPFLOAT *buf, int FFTsize); void sp_fft_destroy(sp_fft *fft); #ifndef kiss_fft_scalar #define kiss_fft_scalar SPFLOAT #endif typedef struct { kiss_fft_scalar r; kiss_fft_scalar i; }kiss_fft_cpx; typedef struct kiss_fft_state* kiss_fft_cfg; typedef struct kiss_fftr_state* kiss_fftr_cfg;
1,913
C++
.h
65
27.092308
80
0.711318
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
true
false
false
false
false
false
false
20,095
dcblock.h
LMMS_lmms/plugins/ReverbSC/dcblock.h
typedef struct { SPFLOAT gg; SPFLOAT outputs; SPFLOAT inputs; SPFLOAT gain; } sp_dcblock; int sp_dcblock_create(sp_dcblock **p); int sp_dcblock_destroy(sp_dcblock **p); int sp_dcblock_init(sp_data *sp, sp_dcblock *p, int oversampling ); int sp_dcblock_compute(sp_data *sp, sp_dcblock *p, SPFLOAT *in, SPFLOAT *out);
333
C++
.h
10
30.6
78
0.717391
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
true
false
false
false
false
false
false
20,097
ReverbSC.h
LMMS_lmms/plugins/ReverbSC/ReverbSC.h
/* * RerverbSC.h - Reverb algorithm by Sean Costello * * Copyright (c) 2017 Paul Batchelor * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef REVERBSC_H #define REVERBSC_H #include "Effect.h" #include "ReverbSCControls.h" extern "C" { #include "base.h" #include "revsc.h" #include "dcblock.h" } namespace lmms { class ReverbSCEffect : public Effect { public: ReverbSCEffect( Model* parent, const Descriptor::SubPluginFeatures::Key* key ); ~ReverbSCEffect() override; ProcessStatus processImpl(SampleFrame* buf, const fpp_t frames) override; EffectControls* controls() override { return &m_reverbSCControls; } void changeSampleRate(); private: ReverbSCControls m_reverbSCControls; sp_data *sp; sp_revsc *revsc; sp_dcblock *dcblk[2]; QMutex mutex; friend class ReverbSCControls; } ; } // namespace lmms #endif
1,604
C++
.h
55
27
80
0.759452
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,098
ReverbSCControlDialog.h
LMMS_lmms/plugins/ReverbSC/ReverbSCControlDialog.h
/* * ReverbSCControlDialog.h - control dialog for ReverbSC * * Copyright (c) 2017 Paul Batchelor * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef REVERBSC_CONTROL_DIALOG_H #define REVERBSC_CONTROL_DIALOG_H #include "EffectControlDialog.h" namespace lmms { class ReverbSCControls; namespace gui { class ReverbSCControlDialog : public EffectControlDialog { Q_OBJECT public: ReverbSCControlDialog( ReverbSCControls* controls ); ~ReverbSCControlDialog() override = default; } ; } // namespace gui } // namespace lmms #endif
1,292
C++
.h
41
29.585366
70
0.776252
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,099
VstEffectControlDialog.h
LMMS_lmms/plugins/VstEffect/VstEffectControlDialog.h
/* * VstEffectControlDialog.h - dialog for displaying GUI of VST-effect-plugin * * Copyright (c) 2006-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef _VST_EFFECT_CONTROL_DIALOG_H #define _VST_EFFECT_CONTROL_DIALOG_H #include "EffectControlDialog.h" #include <QSharedPointer> class QPixmap; class QPushButton; class QLabel; namespace lmms { class VstEffectControls; class VstPlugin; namespace gui { class PixmapButton; class VstEffectControlDialog : public EffectControlDialog { Q_OBJECT public: VstEffectControlDialog( VstEffectControls * _controls ); ~VstEffectControlDialog() override; protected: void paintEvent( QPaintEvent * _pe ) override; void showEvent( QShowEvent* _se ) override; private: QWidget * m_pluginWidget; QPushButton * m_togglePluginButton; PixmapButton * m_openPresetButton; PixmapButton * m_rolLPresetButton; PixmapButton * m_rolRPresetButton; PixmapButton * m_managePluginButton; PixmapButton * m_savePresetButton; QSharedPointer<VstPlugin> m_plugin; QLabel * tbLabel; public slots: void togglePluginUI( bool checked ); } ; } // namespace gui } // namespace lmms #endif
1,941
C++
.h
62
29.387097
77
0.788058
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,100
VstEffectControls.h
LMMS_lmms/plugins/VstEffect/VstEffectControls.h
/* * VstEffectControls.h - controls for VST effect plugins * * Copyright (c) 2008-2011 Tobias Doerffel <tobydox/at/users.sourceforge.net> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef _VST_EFFECT_CONTROLS_H #define _VST_EFFECT_CONTROLS_H #include "EffectControls.h" #include <QObject> class QGridLayout; class QPaintEvent; class QPushButton; class QMdiSubWindow; class QScrollArea; namespace lmms { class VstEffect; namespace gui { class CustomTextKnob; class ManageVSTEffectView; class VstEffectControlDialog; } class VstEffectControls : public EffectControls { Q_OBJECT public: VstEffectControls( VstEffect * _eff ); ~VstEffectControls() override; void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; void loadSettings( const QDomElement & _this ) override; inline QString nodeName() const override { return "vsteffectcontrols"; } int controlCount() override; gui::EffectControlDialog* createView() override; protected slots: void updateMenu(); void managePlugin(); void openPreset(); void savePreset(); void rollPreset(); void rolrPreset(); void selPreset(); void setParameter( lmms::Model * action ); protected: virtual void paintEvent( QPaintEvent * _pe ); private: VstEffect * m_effect; QPushButton * m_selPresetButton; QMdiSubWindow * m_subWindow; QScrollArea * m_scrollArea; std::vector<FloatModel*> knobFModel; int paramCount; QObject * ctrHandle; int lastPosInMenu; // QLabel * m_presetLabel; friend class gui::VstEffectControlDialog; friend class gui::ManageVSTEffectView; bool m_vstGuiVisible; } ; namespace gui { class ManageVSTEffectView : public QObject { Q_OBJECT public: ManageVSTEffectView( VstEffect * _eff, VstEffectControls * m_vi ); ~ManageVSTEffectView() override; protected slots: void syncPlugin(); void displayAutomatedOnly(); void setParameter( lmms::Model * action ); void syncParameterText(); void closeWindow(); private: // static QPixmap * s_artwork; VstEffectControls * m_vi2; VstEffect * m_effect; QWidget *widget; QGridLayout * l; QPushButton * m_syncButton; QPushButton * m_displayAutomatedOnly; QPushButton * m_closeButton; CustomTextKnob ** vstKnobs; } ; } // namespace gui } // namespace lmms #endif
3,009
C++
.h
108
25.814815
77
0.780966
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,101
VstSubPluginFeatures.h
LMMS_lmms/plugins/VstEffect/VstSubPluginFeatures.h
/* * VstSubPluginFeatures.h - derivation from * Plugin::Descriptor::SubPluginFeatures for * hosting VST-plugins * * Copyright (c) 2006-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef _VST_SUBPLUGIN_FEATURES_H #define _VST_SUBPLUGIN_FEATURES_H #include "Effect.h" #include "Plugin.h" namespace lmms { class VstSubPluginFeatures : public Plugin::Descriptor::SubPluginFeatures { public: VstSubPluginFeatures( Plugin::Type _type ); void fillDescriptionWidget( QWidget * _parent, const Key * _key ) const override; void listSubPluginKeys( const Plugin::Descriptor * _desc, KeyList & _kl ) const override; private: void addPluginsFromDir(QStringList* filenames, QString path) const; } ; } // namespace lmms #endif
1,612
C++
.h
44
34.227273
77
0.734576
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,102
VstEffect.h
LMMS_lmms/plugins/VstEffect/VstEffect.h
/* * VstEffect.h - class for handling VST effect plugins * * Copyright (c) 2006-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef _VST_EFFECT_H #define _VST_EFFECT_H #include <QMutex> #include <QSharedPointer> #include "Effect.h" #include "VstEffectControls.h" namespace lmms { class VstPlugin; class VstEffect : public Effect { public: VstEffect( Model * _parent, const Descriptor::SubPluginFeatures::Key * _key ); ~VstEffect() override = default; ProcessStatus processImpl(SampleFrame* buf, const fpp_t frames) override; EffectControls * controls() override { return &m_vstControls; } private: //! Returns true if plugin was loaded (m_plugin != nullptr) bool openPlugin(const QString& plugin); void closePlugin(); QSharedPointer<VstPlugin> m_plugin; QMutex m_pluginMutex; EffectKey m_key; VstEffectControls m_vstControls; friend class VstEffectControls; friend class gui::VstEffectControlDialog; friend class gui::ManageVSTEffectView; } ; } // namespace lmms #endif
1,820
C++
.h
57
29.824561
77
0.769937
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,103
RemoteZynAddSubFx.h
LMMS_lmms/plugins/ZynAddSubFx/RemoteZynAddSubFx.h
/* * RemoteZynAddSubFx.h - ZynAddSubFX-embedding plugin * * Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef REMOTE_ZYNADDSUBFX_H #define REMOTE_ZYNADDSUBFX_H #include "RemotePluginBase.h" namespace lmms { enum ZasfRemoteMessageIDs { IdZasfPresetDirectory = RemoteMessageIDs::IdUserBase, IdZasfLmmsWorkingDirectory, IdZasfSetPitchWheelBendRange } ; } // namespace lmms #endif
1,218
C++
.h
36
31.916667
77
0.780239
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,104
ZynAddSubFx.h
LMMS_lmms/plugins/ZynAddSubFx/ZynAddSubFx.h
/* * ZynAddSubFx.h - ZynAddSubFX-embedding plugin * * Copyright (c) 2008-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef ZYNADDSUBFX_H #define ZYNADDSUBFX_H #include <QMap> #include <QMutex> #include <globals.h> #include "AutomatableModel.h" #include "Instrument.h" #include "InstrumentView.h" #include "RemotePlugin.h" class QPushButton; namespace lmms { class LocalZynAddSubFx; class NotePlayHandle; namespace gui { class Knob; class LedCheckBox; class ZynAddSubFxView; } class ZynAddSubFxRemotePlugin : public RemotePlugin { Q_OBJECT public: ZynAddSubFxRemotePlugin(); bool processMessage( const message & _m ) override; signals: void clickedCloseButton(); } ; class ZynAddSubFxInstrument : public Instrument { Q_OBJECT public: ZynAddSubFxInstrument( InstrumentTrack * _instrument_track ); ~ZynAddSubFxInstrument() override; void play( SampleFrame* _working_buffer ) override; bool handleMidiEvent( const MidiEvent& event, const TimePos& time = TimePos(), f_cnt_t offset = 0 ) override; void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; void loadSettings( const QDomElement & _this ) override; void loadFile( const QString & _file ) override; QString nodeName() const override; gui::PluginView* instantiateView( QWidget * _parent ) override; private slots: void reloadPlugin(); void updatePitchRange(); void updatePortamento(); void updateFilterFreq(); void updateFilterQ(); void updateBandwidth(); void updateFmGain(); void updateResCenterFreq(); void updateResBandwidth(); private: void initPlugin(); void sendControlChange( MidiControllers midiCtl, float value ); bool m_hasGUI; QMutex m_pluginMutex; LocalZynAddSubFx * m_plugin; ZynAddSubFxRemotePlugin * m_remotePlugin; FloatModel m_portamentoModel; FloatModel m_filterFreqModel; FloatModel m_filterQModel; FloatModel m_bandwidthModel; FloatModel m_fmGainModel; FloatModel m_resCenterFreqModel; FloatModel m_resBandwidthModel; BoolModel m_forwardMidiCcModel; QMap<int, bool> m_modifiedControllers; friend class gui::ZynAddSubFxView; signals: void settingsChanged(); } ; namespace gui { class ZynAddSubFxView : public InstrumentViewFixedSize { Q_OBJECT public: ZynAddSubFxView( Instrument * _instrument, QWidget * _parent ); protected: void dragEnterEvent( QDragEnterEvent * _dee ) override; void dropEvent( QDropEvent * _de ) override; private: void modelChanged() override; QPushButton * m_toggleUIButton; Knob * m_portamento; Knob * m_filterFreq; Knob * m_filterQ; Knob * m_bandwidth; Knob * m_fmGain; Knob * m_resCenterFreq; Knob * m_resBandwidth; LedCheckBox * m_forwardMidiCC; private slots: void toggleUI(); } ; } // namespace gui } // namespace lmms #endif
3,567
C++
.h
122
27.172131
110
0.787736
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
true
false
false
false
false
false
false
20,105
LocalZynAddSubFx.h
LMMS_lmms/plugins/ZynAddSubFx/LocalZynAddSubFx.h
/* * LocalZynAddSubFx.h - local implementation of ZynAddSubFx plugin * * Copyright (c) 2009-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef LOCAL_ZYNADDSUBFX_H #define LOCAL_ZYNADDSUBFX_H #include <array> #include "Note.h" class Master; class NulEngine; namespace lmms { class MidiEvent; class SampleFrame; class LocalZynAddSubFx { public: LocalZynAddSubFx(); ~LocalZynAddSubFx(); void initConfig(); void setSampleRate( int _sampleRate ); void setBufferSize( int _bufferSize ); void saveXML( const std::string & _filename ); void loadXML( const std::string & _filename ); void loadPreset( const std::string & _filename, int _part = 0 ); void setPresetDir( const std::string & _dir ); void setLmmsWorkingDir( const std::string & _dir ); void setPitchWheelBendRange( int semitones ); void processMidiEvent( const MidiEvent& event ); void processAudio( SampleFrame* _out ); inline Master * master() { return m_master; } protected: static int s_instanceCount; std::string m_presetsDir; std::array<int, NumKeys> m_runningNotes = {}; Master * m_master; NulEngine* m_ioEngine; } ; } // namespace lmms #endif
1,963
C++
.h
62
29.516129
77
0.757867
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,106
Nes.h
LMMS_lmms/plugins/Nes/Nes.h
/* Nes.h - A NES instrument plugin for LMMS * * Copyright (c) 2014 Vesa Kivim√§ki * Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef NES_H #define NES_H #include <cmath> #include "Instrument.h" #include "InstrumentView.h" #include "AutomatableModel.h" #include "PixmapButton.h" #define makeknob( name, x, y, hint, unit, oname ) \ name = new Knob( KnobType::Styled, this ); \ name ->move( x, y ); \ name ->setHintText( hint, unit ); \ name ->setObjectName( oname ); \ name ->setFixedSize( 29, 29 ); #define makenesled( name, x, y, ttip ) \ name = new PixmapButton( this, nullptr ); \ name -> setCheckable( true ); \ name -> move( x, y ); \ name -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "nesled_on" ) ); \ name -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "nesled_off" ) ); \ name->setToolTip(ttip); #define makedcled( name, x, y, ttip, active ) \ PixmapButton * name = new PixmapButton( this, nullptr ); \ name -> move( x, y ); \ name -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( active ) ); \ name -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "nesdc_off" ) ); \ name->setToolTip(ttip); namespace lmms { const float NES_SIMPLE_FILTER = 1.f / 20.f; // simulate nes analog audio output const float NFB = 895000.0f; const float NOISE_FREQS[16] = { NFB/5, NFB/9, NFB/17, NFB/33, NFB/65, NFB/97, NFB/129, NFB/161, NFB/193, NFB/255, NFB/381, NFB/509, NFB/763, NFB/1017, NFB/2035, NFB/4069 }; const uint16_t LFSR_INIT = 1; const float DUTY_CYCLE[4] = { 0.125, 0.25, 0.5, 0.75 }; const float DITHER_AMP = 1.f / 60.f; const float MIN_FREQ = 10.0; const int TRIANGLE_WAVETABLE[32] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; const float NES_DIST = 0.9f; // simulate the slight nonlinear distortion in nes audio output const float NES_MIXING_12 = 1.f / 20.f; const float NES_MIXING_34 = 1.f / 12.f; const float NES_MIXING_ALL = 1.f / (NES_MIXING_12 + NES_MIXING_34); // constants to simulate the hardwired mixing values for nes channels const int MIN_WLEN = 4; class NesInstrument; namespace gui { class Knob; class NesInstrumentView; } // namespace gui class NesObject { public: NesObject( NesInstrument * nes, const sample_rate_t samplerate, NotePlayHandle * nph ); virtual ~NesObject() = default; void renderOutput( SampleFrame* buf, fpp_t frames ); void updateVibrato( float * freq ); void updatePitch(); void updateLFSR( bool mode ) { uint16_t LFSRx; if( mode ) { LFSRx = m_LFSR & ( 1 << 8 ); // get bit 13 LFSRx <<= 6; // shit to left so it overlaps with bit 14 } else { LFSRx = m_LFSR & ( 1 << 13 ); // get bit 13 LFSRx <<= 1; // shit to left so it overlaps with bit 14 } m_LFSR ^= LFSRx; // xor bit 14 with bit 8/13 depending on mode m_LFSR <<= 1; // shift bit 14 to bit 15 // cycle bit 14 to 0 if( m_LFSR & ( 1 << 15 ) ) // if bit 15 is set { m_LFSR++; // set bit 0 - we know it to be 0 because of the left shift so we can just inc here } } inline bool LFSR() // returns true if bit 14 is set { if( m_LFSR & ( 1 << 14 ) ) { return true; } return false; } inline int wavelength( float freq ) { return static_cast<int>( m_samplerate / freq ); } inline int nearestNoiseFreq( float f ) { int n = 15; for( int i = 15; i >= 0; i-- ) { if( f >= NOISE_FREQS[ i ] ) { n = i; } } return n; } private: NesInstrument * m_parent; const sample_rate_t m_samplerate; NotePlayHandle * m_nph; int m_pitchUpdateCounter; int m_pitchUpdateFreq; int m_ch1Counter; int m_ch2Counter; int m_ch3Counter; int m_ch4Counter; int m_ch1EnvCounter; int m_ch2EnvCounter; int m_ch4EnvCounter; int m_ch1EnvValue; int m_ch2EnvValue; int m_ch4EnvValue; int m_ch1SweepCounter; int m_ch2SweepCounter; int m_ch4SweepCounter; uint16_t m_LFSR; float m_12Last; float m_34Last; float m_lastNoteFreq; float m_lastNoiseFreq; int m_maxWlen; float m_nsf; // wavelengths int m_wlen1; int m_wlen2; int m_wlen3; int m_wlen4; // vibrato int m_vibratoPhase; }; class NesInstrument : public Instrument { Q_OBJECT public: NesInstrument( InstrumentTrack * instrumentTrack ); ~NesInstrument() override = default; void playNote( NotePlayHandle * n, SampleFrame* workingBuffer ) override; void deleteNotePluginData( NotePlayHandle * n ) override; void saveSettings( QDomDocument & doc, QDomElement & element ) override; void loadSettings( const QDomElement & element ) override; QString nodeName() const override; float desiredReleaseTimeMs() const override { return 0.2f; } gui::PluginView* instantiateView( QWidget * parent ) override; public slots: void updateFreq1(); void updateFreq2(); void updateFreq3(); protected: //freq helpers float m_freq1; float m_freq2; float m_freq3; private: // channel 1 BoolModel m_ch1Enabled; FloatModel m_ch1Crs; FloatModel m_ch1Volume; BoolModel m_ch1EnvEnabled; BoolModel m_ch1EnvLooped; FloatModel m_ch1EnvLen; IntModel m_ch1DutyCycle; BoolModel m_ch1SweepEnabled; FloatModel m_ch1SweepAmt; FloatModel m_ch1SweepRate; // channel 2 BoolModel m_ch2Enabled; FloatModel m_ch2Crs; FloatModel m_ch2Volume; BoolModel m_ch2EnvEnabled; BoolModel m_ch2EnvLooped; FloatModel m_ch2EnvLen; IntModel m_ch2DutyCycle; BoolModel m_ch2SweepEnabled; FloatModel m_ch2SweepAmt; FloatModel m_ch2SweepRate; //channel 3 BoolModel m_ch3Enabled; FloatModel m_ch3Crs; FloatModel m_ch3Volume; //channel 4 BoolModel m_ch4Enabled; FloatModel m_ch4Volume; BoolModel m_ch4EnvEnabled; BoolModel m_ch4EnvLooped; FloatModel m_ch4EnvLen; BoolModel m_ch4NoiseMode; BoolModel m_ch4NoiseFreqMode; FloatModel m_ch4NoiseFreq; FloatModel m_ch4Sweep; BoolModel m_ch4NoiseQuantize; //master FloatModel m_masterVol; FloatModel m_vibrato; friend class NesObject; friend class gui::NesInstrumentView; }; namespace gui { class NesInstrumentView : public InstrumentViewFixedSize { Q_OBJECT public: NesInstrumentView( Instrument * instrument, QWidget * parent ); ~NesInstrumentView() override = default; private: void modelChanged() override; // channel 1 PixmapButton * m_ch1EnabledBtn; Knob * m_ch1CrsKnob; Knob * m_ch1VolumeKnob; PixmapButton * m_ch1EnvEnabledBtn; PixmapButton * m_ch1EnvLoopedBtn; Knob * m_ch1EnvLenKnob; automatableButtonGroup * m_ch1DutyCycleGrp; PixmapButton * m_ch1SweepEnabledBtn; Knob * m_ch1SweepAmtKnob; Knob * m_ch1SweepRateKnob; // channel 2 PixmapButton * m_ch2EnabledBtn; Knob * m_ch2CrsKnob; Knob * m_ch2VolumeKnob; PixmapButton * m_ch2EnvEnabledBtn; PixmapButton * m_ch2EnvLoopedBtn; Knob * m_ch2EnvLenKnob; automatableButtonGroup * m_ch2DutyCycleGrp; PixmapButton * m_ch2SweepEnabledBtn; Knob * m_ch2SweepAmtKnob; Knob * m_ch2SweepRateKnob; //channel 3 PixmapButton * m_ch3EnabledBtn; Knob * m_ch3CrsKnob; Knob * m_ch3VolumeKnob; //channel 4 PixmapButton * m_ch4EnabledBtn; Knob * m_ch4VolumeKnob; PixmapButton * m_ch4EnvEnabledBtn; PixmapButton * m_ch4EnvLoopedBtn; Knob * m_ch4EnvLenKnob; PixmapButton * m_ch4NoiseModeBtn; PixmapButton * m_ch4NoiseFreqModeBtn; Knob * m_ch4NoiseFreqKnob; Knob * m_ch4SweepKnob; PixmapButton * m_ch4NoiseQuantizeBtn; //master Knob * m_masterVolKnob; Knob * m_vibratoKnob; }; } // namespace gui } // namespace lmms #endif
8,368
C++
.h
285
26.712281
143
0.722845
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
true
false
false
false
false
false
false
20,107
TapTempoView.h
LMMS_lmms/plugins/TapTempo/TapTempoView.h
/* * TapTempoView.h - Plugin to count beats per minute * * * Copyright (c) 2022 saker <sakertooth@gmail.com> * * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef LMMS_GUI_TAP_TEMPO_VIEW_H #define LMMS_GUI_TAP_TEMPO_VIEW_H #include "ToolPluginView.h" class QVBoxLayout; class QHBoxLayout; class QPushButton; class QLabel; class QCloseEvent; class QKeyEvent; class QCheckBox; namespace lmms { class TapTempo; } namespace lmms::gui { class TapTempoView : public ToolPluginView { Q_OBJECT public: TapTempoView(TapTempo* plugin); void updateLabels(); void keyPressEvent(QKeyEvent* event) override; void closeEvent(QCloseEvent*) override; private: QPushButton* m_tapButton; QLabel* m_msLabel; QLabel* m_hzLabel; TapTempo* m_plugin; friend class TapTempo; }; } // namespace lmms::gui #endif // LMMS_GUI_TAP_TEMPO_VIEW_H
1,587
C++
.h
56
26.589286
70
0.771504
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,108
TapTempo.h
LMMS_lmms/plugins/TapTempo/TapTempo.h
/* * TapTempo.h - Plugin to count beats per minute * * Copyright (c) 2022 saker <sakertooth@gmail.com> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef LMMS_TAP_TEMPO_H #define LMMS_TAP_TEMPO_H #include <chrono> #include "TapTempoView.h" #include "ToolPlugin.h" namespace lmms { class TapTempo : public ToolPlugin { Q_OBJECT public: using clock = std::chrono::steady_clock; TapTempo(); void onBpmClick(); QString nodeName() const override; void saveSettings(QDomDocument&, QDomElement&) override {} void loadSettings(const QDomElement&) override {} gui::PluginView* instantiateView(QWidget*) override { return new gui::TapTempoView(this); } private: std::chrono::time_point<clock> m_startTime; int m_numTaps = 0; int m_tapsNeededToDisplay = 2; double m_bpm = 0.0; bool m_showDecimal = false; friend class gui::TapTempoView; }; } // namespace lmms #endif // LMMS_TAP_TEMPO_H
1,655
C++
.h
50
31.16
92
0.75596
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,109
AmplifierControls.h
LMMS_lmms/plugins/Amplifier/AmplifierControls.h
/* * AmplifierControls.h - controls for bassboosterx -effect * * Copyright (c) 2014 Vesa Kivim√§ki <contact/dot/diizy/at/nbl/dot/fi> * Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef LMMS_AMPLIFIER_CONTROLS_H #define LMMS_AMPLIFIER_CONTROLS_H #include "EffectControls.h" #include "AmplifierControlDialog.h" namespace lmms { class AmplifierEffect; namespace gui { class AmplifierControlDialog; } class AmplifierControls : public EffectControls { Q_OBJECT public: AmplifierControls(AmplifierEffect* effect); ~AmplifierControls() override = default; void saveSettings(QDomDocument& doc, QDomElement& parent) override; void loadSettings(const QDomElement& parent) override; inline QString nodeName() const override { return "AmplifierControls"; } gui::EffectControlDialog* createView() override { return new gui::AmplifierControlDialog(this); } int controlCount() override { return 4; } private: AmplifierEffect* m_effect; FloatModel m_volumeModel; FloatModel m_panModel; FloatModel m_leftModel; FloatModel m_rightModel; friend class gui::AmplifierControlDialog; friend class AmplifierEffect; }; } // namespace lmms #endif // LMMS_AMPLIFIER_CONTROLS_H
2,015
C++
.h
63
30.079365
77
0.786193
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,110
Amplifier.h
LMMS_lmms/plugins/Amplifier/Amplifier.h
/* * Amplifier.h - amplifier-effect-plugin * * Copyright (c) 2014 Vesa Kivim√§ki <contact/dot/diizy/at/nbl/dot/fi> * Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef LMMS_AMPLIFIER_H #define LMMS_AMPLIFIER_H #include "Effect.h" #include "AmplifierControls.h" namespace lmms { class AmplifierEffect : public Effect { public: AmplifierEffect(Model* parent, const Descriptor::SubPluginFeatures::Key* key); ~AmplifierEffect() override = default; ProcessStatus processImpl(SampleFrame* buf, const fpp_t frames) override; EffectControls* controls() override { return &m_ampControls; } private: AmplifierControls m_ampControls; friend class AmplifierControls; }; } // namespace lmms #endif // LMMS_AMPLIFIER_H
1,555
C++
.h
46
31.869565
79
0.769847
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,111
AmplifierControlDialog.h
LMMS_lmms/plugins/Amplifier/AmplifierControlDialog.h
/* * AmplifierControlDialog.h - control dialog for amplifier effect * * Copyright (c) 2014 Vesa Kivim√§ki <contact/dot/diizy/at/nbl/dot/fi> * Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef LMMS_GUI_AMPLIFIER_CONTROL_DIALOG_H #define LMMS_GUI_AMPLIFIER_CONTROL_DIALOG_H #include "EffectControlDialog.h" namespace lmms { class AmplifierControls; class FloatModel; namespace gui { class Knob; class AmplifierControlDialog : public EffectControlDialog { Q_OBJECT public: AmplifierControlDialog(AmplifierControls* controls); ~AmplifierControlDialog() override = default; }; } // namespace gui } // namespace lmms #endif // LMMS_GUI_AMPLIFIER_CONTROL_DIALOG_H
1,501
C++
.h
44
32.295455
77
0.778853
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,112
LadspaControls.h
LMMS_lmms/plugins/LadspaEffect/LadspaControls.h
/* * LadspaControls.h - model for LADSPA plugin controls * * Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef LADSPA_CONTROLS_H #define LADSPA_CONTROLS_H #include "EffectControls.h" #include "LadspaControlDialog.h" #include "LadspaMatrixControlDialog.h" namespace lmms { class LadspaControl; using control_list_t = QVector<LadspaControl*>; class LadspaEffect; class LadspaControls : public EffectControls { Q_OBJECT public: LadspaControls( LadspaEffect * _eff ); ~LadspaControls() override; inline int controlCount() override { return m_controlCount; } void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; void loadSettings( const QDomElement & _this ) override; inline QString nodeName() const override { return "ladspacontrols"; } gui::EffectControlDialog* createView() override { return new gui::LadspaMatrixControlDialog( this ); } protected slots: void updateLinkStatesFromGlobal(); void linkPort( int _port, bool _state ); private: LadspaEffect * m_effect; ch_cnt_t m_processors; ch_cnt_t m_controlCount; bool m_noLink; BoolModel m_stereoLinkModel; //! control vector for each processor QVector<control_list_t> m_controls; friend class gui::LadspaControlDialog; friend class gui::LadspaMatrixControlDialog; friend class LadspaEffect; signals: void effectModelChanged( lmms::LadspaControls * ); } ; } // namespace lmms #endif
2,239
C++
.h
72
29.013889
77
0.778451
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,113
LadspaEffect.h
LMMS_lmms/plugins/LadspaEffect/LadspaEffect.h
/* * LadspaEffect.h - class for handling LADSPA effect plugins * * Copyright (c) 2006-2008 Danny McRae <khjklujn/at/users.sourceforge.net> * Copyright (c) 2009 Tobias Doerffel <tobydox/at/users.sourceforge.net> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef _LADSPA_EFFECT_H #define _LADSPA_EFFECT_H #include <QMutex> #include "Effect.h" #include "ladspa.h" #include "LadspaControls.h" #include "LadspaManager.h" namespace lmms { struct port_desc_t; using multi_proc_t = QVector<port_desc_t*>; class LadspaEffect : public Effect { Q_OBJECT public: LadspaEffect( Model * _parent, const Descriptor::SubPluginFeatures::Key * _key ); ~LadspaEffect() override; ProcessStatus processImpl(SampleFrame* buf, const fpp_t frames) override; void setControl( int _control, LADSPA_Data _data ); EffectControls * controls() override { return m_controls; } inline const multi_proc_t & getPortControls() { return m_portControls; } private slots: void changeSampleRate(); private: void pluginInstantiation(); void pluginDestruction(); static sample_rate_t maxSamplerate( const QString & _name ); QMutex m_pluginMutex; LadspaControls * m_controls; sample_rate_t m_maxSampleRate; ladspa_key_t m_key; int m_portCount; bool m_inPlaceBroken; const LADSPA_Descriptor * m_descriptor; QVector<LADSPA_Handle> m_handles; QVector<multi_proc_t> m_ports; multi_proc_t m_portControls; } ; } // namespace lmms #endif
2,200
C++
.h
71
28.873239
74
0.765321
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
true
false
false
false
false
false
false
20,114
LadspaMatrixControlDialog.h
LMMS_lmms/plugins/LadspaEffect/LadspaMatrixControlDialog.h
/* * LadspaMatrixControlDialog.h - Dialog for displaying and editing control port * values for LADSPA plugins in a matrix display * * Copyright (c) 2015 Michael Gregorius <michaelgregorius/at/web[dot]de> * * This file is part of LMMS - http://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef LADSPA_MATRIX_CONTROL_DIALOG_H #define LADSPA_MATRIX_CONTROL_DIALOG_H #include "EffectControlDialog.h" #include "lmms_basics.h" class QGridLayout; class QScrollArea; namespace lmms { class LadspaControls; namespace gui { class LedCheckBox; class LadspaMatrixControlDialog : public EffectControlDialog { Q_OBJECT public: LadspaMatrixControlDialog(LadspaControls* ctl); bool isResizable() const override; private slots: void updateEffectView(LadspaControls* ctl); private: /** * @brief Checks if a link column is needed for the current effect controls. * @return true if a link column is needed. */ bool needsLinkColumn() const; /** * @brief Arranges widgets for the current controls in a grid/matrix layout. * @param parent The parent of all created widgets * @param gridLayout The layout into which the controls are organized */ void arrangeControls(QWidget * parent, QGridLayout* gridLayout); /** * @brief Creates a widget that holds the widgets of the current controls in a matrix arrangement. * @param ladspaControls * @return */ QWidget * createMatrixWidget(); LadspaControls * getLadspaControls() const; ch_cnt_t getChannelCount() const; private: QScrollArea* m_scrollArea; LedCheckBox* m_stereoLink; }; } // namespace gui } // namespace lmms #endif
2,350
C++
.h
71
30.985915
99
0.766268
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,115
LadspaSubPluginFeatures.h
LMMS_lmms/plugins/LadspaEffect/LadspaSubPluginFeatures.h
/* * LadspaSubPluginFeatures.h - derivation from * Plugin::Descriptor::SubPluginFeatures for * hosting LADSPA-plugins * * Copyright (c) 2006-2007 Danny McRae <khjklujn/at/users.sourceforge.net> * Copyright (c) 2006-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef LADSPA_SUBPLUGIN_FEATURES_H #define LADSPA_SUBPLUGIN_FEATURES_H #include "LadspaManager.h" #include "Plugin.h" namespace lmms { class LadspaSubPluginFeatures : public Plugin::Descriptor::SubPluginFeatures { public: LadspaSubPluginFeatures( Plugin::Type _type ); QString displayName(const Key& k) const override; void fillDescriptionWidget( QWidget * _parent, const Key * _key ) const override; void listSubPluginKeys( const Plugin::Descriptor * _desc, KeyList & _kl ) const override; static ladspa_key_t subPluginKeyToLadspaKey( const Key * _key ); }; } // namespace lmms #endif
1,756
C++
.h
45
36.533333
77
0.736749
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,116
LadspaControlDialog.h
LMMS_lmms/plugins/LadspaEffect/LadspaControlDialog.h
/* * LadspaControlDialog.h - dialog for displaying and editing control port * values for LADSPA plugins * * Copyright (c) 2006-2008 Danny McRae <khjklujn/at/users.sourceforge.net> * Copyright (c) 2009 Tobias Doerffel <tobydox/at/users.sourceforge.net> * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef LADSPA_CONTROL_DIALOG_H #define LADSPA_CONTROL_DIALOG_H #include "EffectControlDialog.h" class QHBoxLayout; namespace lmms { class LadspaControls; namespace gui { class LedCheckBox; class LadspaControlDialog : public EffectControlDialog { Q_OBJECT public: LadspaControlDialog( LadspaControls * _ctl ); ~LadspaControlDialog() override = default; private slots: void updateEffectView( lmms::LadspaControls * _ctl ); private: QHBoxLayout * m_effectLayout; LedCheckBox * m_stereoLink; } ; } // namespace gui } // namespace lmms #endif
1,642
C++
.h
50
30.8
74
0.765118
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,117
LadspaWidgetFactory.h
LMMS_lmms/plugins/LadspaEffect/LadspaWidgetFactory.h
/* * LadspaWidgetFactory.h - Factory that creates widgets for LADSPA ports * * Copyright (c) 2023 Michael Gregorius * * This file is part of LMMS - https://lmms.io * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef LMMS_GUI_LADSPA_WIDGET_FACTORY_H #define LMMS_GUI_LADSPA_WIDGET_FACTORY_H class QWidget; namespace lmms { class LadspaControl; namespace gui { class LadspaWidgetFactory { public: static QWidget * createWidget(LadspaControl * ladspaControl, QWidget * parent); }; } // namespace gui } // namespace lmms #endif // LMMS_GUI_LADSPA_WIDGET_FACTORY_H
1,276
C++
.h
39
30.871795
80
0.770171
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,118
Sin.h
LMMS_lmms/plugins/LadspaEffect/caps/Sin.h
/* Sin.h Copyright 2004-11 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ sin() generator. */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. */ #ifndef _SIN_H_ #define _SIN_H_ #include "dsp/Sine.h" class Sin : public Plugin { public: sample_t f, gain; DSP::Sine sin; template <sample_func_t F> void one_cycle (int frames); public: static PortInfo port_info []; void init(); void activate() { gain = getport(1); } void run (int n) { one_cycle<store_func> (n); } void run_adding (int n) { one_cycle<adding_func> (n); } }; #endif /* _SIN_H_ */
1,303
C++
.h
46
25.565217
66
0.72595
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,119
VCO.h
LMMS_lmms/plugins/LadspaEffect/caps/VCO.h
/* VCO.h Copyright 2004-5 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ an oversampled triangle/saw/square oscillator, and a combination of two such oscillators with hard sync. */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. */ #ifndef _VCO_H_ #define _VCO_H_ #include "dsp/util.h" #include "dsp/VCO.h" #include "dsp/FIR.h" #include "dsp/sinc.h" #include "dsp/windows.h" class VCOs : public Plugin { public: sample_t f, gain; /* ok to just change these as you please, 4/32 works ok, sortof. */ enum { OVERSAMPLE = 8, FIR_SIZE = 64, }; DSP::TriSawSquare vco; /* downsampling filter */ DSP::FIR down; template <sample_func_t F> void one_cycle (int frames); public: static PortInfo port_info[]; VCOs() : down (FIR_SIZE) { } void init(); void activate() { gain = *ports[3]; down.reset(); vco.reset(); } void run (int n) { one_cycle<store_func> (n); } void run_adding (int n) { one_cycle<adding_func> (n); } }; /* //////////////////////////////////////////////////////////////////////// */ class VCOd : public Plugin { public: double fs; sample_t f, gain; /* ok to just change these as you please, 4/32 works ok, sortof. */ enum { OVERSAMPLE = 8, FIR_SIZE = 64, }; DSP::VCO2 vco; /* downsampling filter */ DSP::FIR down; template <sample_func_t F> void one_cycle (int frames); public: static PortInfo port_info[]; VCOd() : down (FIR_SIZE) { } void init(); void activate() { gain = *ports[8]; down.reset(); vco.reset(); } void run (int n) { one_cycle<store_func> (n); } void run_adding (int n) { one_cycle<adding_func> (n); } }; #endif /* _VCO_H_ */
2,451
C++
.h
103
20.631068
78
0.658157
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,120
Clip.h
LMMS_lmms/plugins/LadspaEffect/caps/Clip.h
/* Clip.h Copyright 2004-5 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ oversampled hard ('diode', 'transistor', sometimes 'op-amp') clipper. */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. */ #ifndef _CLIP_H_ #define _CLIP_H_ #include "dsp/util.h" #include "dsp/FIR.h" #include "dsp/sinc.h" #include "dsp/windows.h" class Clip : public Plugin { public: sample_t gain, gain_db; sample_t threshold[2]; enum { OVERSAMPLE = 8, FIR_SIZE = 64, }; /* antialias filters */ DSP::FIRUpsampler up; DSP::FIR down; template <sample_func_t F> void one_cycle (int frames); inline sample_t clip (sample_t x); public: static PortInfo port_info[]; Clip() : up (FIR_SIZE, OVERSAMPLE), down (FIR_SIZE) { } void init(); void activate() { up.reset(); down.reset(); gain_db = *ports[1]; gain = DSP::db2lin (gain_db); } void run (int n) { one_cycle<store_func> (n); } void run_adding (int n) { one_cycle<adding_func> (n); } }; #endif /* _CLIP_H_ */
1,746
C++
.h
66
23.409091
70
0.701511
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,121
White.h
LMMS_lmms/plugins/LadspaEffect/caps/White.h
/* White.h Copyright 2004-5 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ white noise generator. */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. */ #ifndef _WHITE_H_ #define _WHITE_H_ #include "dsp/White.h" class White : public Plugin { public: sample_t gain; DSP::White white; template <sample_func_t F> void one_cycle (int frames); public: static PortInfo port_info []; void init() {} void activate() { gain = getport(0); } void run (int n) { one_cycle<store_func> (n); } void run_adding (int n) { one_cycle<adding_func> (n); } }; #endif /* _WHITE_H_ */
1,320
C++
.h
46
25.956522
66
0.73126
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,122
Phaser.h
LMMS_lmms/plugins/LadspaEffect/caps/Phaser.h
/* Phaser.h Copyright 2002-5 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ Standard and fractal-modulated phaser units. */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. */ #ifndef _PHASER_H_ #define _PHASER_H_ #include "dsp/Sine.h" #include "dsp/Lorenz.h" #include "dsp/Delay.h" /* all-pass as used by the phaser. */ class PhaserAP { public: sample_t a, m; PhaserAP() { a = m = 0.; } void set (double delay) { a = (1 - delay) / (1 + delay); } sample_t process (sample_t x) { sample_t y = -a * x + m; m = a * y + x; return y; } }; class PhaserI : public Plugin { public: PhaserAP ap[6]; DSP::Sine lfo; sample_t rate; sample_t y0; struct { double bottom, range; } delay; template <sample_func_t> void one_cycle (int frames); int blocksize, remain; public: static PortInfo port_info []; void init() { blocksize = 32; } void activate() { y0 = 0.; remain = 0; delay.bottom = 400. / fs; delay.range = 2200. / fs; rate = -1; /* force lfo reset in one_cycle() */ } void run (int n) { one_cycle<store_func> (n); } void run_adding (int n) { one_cycle<adding_func> (n); } }; /* same as above, but filter sweep is controlled by a Lorenz fractal */ class PhaserII : public Plugin { public: double fs; PhaserAP ap[6]; DSP::Lorenz lorenz; sample_t rate; sample_t y0; struct { double bottom, range; } delay; template <sample_func_t> void one_cycle (int frames); int blocksize, remain; public: static PortInfo port_info []; void init() { blocksize = 32; lorenz.init(); } void activate() { y0 = 0.; remain = 0; delay.bottom = 400. / fs; delay.range = 2200. / fs; rate = -1; /* force lfo reset in one_cycle() */ } void run (int n) { one_cycle<store_func> (n); } void run_adding (int n) { one_cycle<adding_func> (n); } }; #endif /* _PHASER_H_ */
2,701
C++
.h
123
18.585366
71
0.661258
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,123
Cabinet-Models32.h
LMMS_lmms/plugins/LadspaEffect/caps/Cabinet-Models32.h
/* Cabinet-Models32.h Copyright 2005 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ Coefficients for 32nd order IIR filters modeling the frequency responses of a few select instrument amplifier speaker boxes. */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. */ Model32 CabinetII::models44100 [] = { { 1, /* identity */ {1}, {0}, 0.2500 }, { 32, /* matchless_off */ {0.751133877447, 0.476665652568, 0.232649157621, 0.073490164573, -0.0520549100755, -0.121257530713, -0.100197130001, -0.0412212505538, 0.0304188276576, 0.0756296082021, 0.0339966964433, -0.0188218345374, -0.0138445066369, 0.0213454687998, 0.0509702380835, 0.0734535180348, 0.0423999627069, 0.0153810625747, 0.0251173605116, 0.0231247294211, 0.0118254107717, 0.0397159715652, 0.0509631315658, 0.0289647310658, -0.0151415828019, -0.0678734405803, -0.093244908543, -0.066522401653, -0.0390777734265, -0.0206522167345, -0.0140462622686, -0.000367155236373}, {0.0, 0.582601584085, 0.179375009603, -0.0310635155569, -0.115346798496, -0.0929627102659, -0.00905181962865, 0.0529760132518, 0.0660791287878, 0.0264313110774, -0.0527906709163, -0.0832644831913, -0.047761487157, -0.00525089678838, 0.00920853658047, 0.00160221988302, -0.036921883774, -0.0508637181262, -0.0369139574948, -0.0297884797081, -0.0131892593004, 0.0328205903451, 0.0532522735819, 0.0434869096278, 0.0171966303505, -0.0117058173799, -0.0222005420711, -0.00885326183421, -0.00467956865215, -0.0017726627279, -0.00860012741033, -0.046231460458}, 0.1088 }, { 32, /* matchless_on */ {0.737841828858, 0.460204992853, 0.280744637086, 0.0935206597339, -0.0705817082991, -0.156854249167, -0.144106172504, -0.0685499381158, 0.00620304241081, 0.0610934722291, 0.0465273895752, -0.0126452119054, -0.0649026246806, -0.0713209874063, -0.0596110923629, -0.0415373874755, -0.0389721881465, -0.0284327312853, -0.0109349222879, 0.0222033554026, 0.0552410801, 0.0896637673103, 0.106570641198, 0.122226072209, 0.115856033255, 0.0801435470104, 0.0100505511461, -0.0489360304782, -0.0829690212741, -0.0887089006669, -0.0886065785655, -0.0469811200837}, {0.0, 0.611100232423, 0.191219480026, -0.0831423854754, -0.193756321128, -0.162103938394, -0.0633420329893, 0.0168905353821, 0.0319336623225, 0.00544046343502, -0.0450052997134, -0.0655650754908, -0.0385274002732, 0.0140346387674, 0.0381359817338, 0.0270741530904, -0.00985978537582, -0.0339616898786, -0.039510862758, -0.0234251294011, -0.00577196250278, 0.00602171273173, -0.0012115688049, -0.00850899153196, -0.0195544970682, -0.0235059343611, -0.0181958065493, 0.00619896262657, 0.0223536984999, 0.0126908937718, -0.0260364491855, -0.048766780312}, 0.1398 }, { 32, /* superchamp */ {0.764583545976, 0.538738620869, 0.179425189777, -0.0185116138637, -0.155373227876, -0.162444114313, -0.0955812737534, -0.0527583372679, 0.0109899803101, 0.027210394773, -0.0177057767782, -0.03205717291, -0.0483168565776, -0.00731185525588, 0.0552452873245, 0.075576957847, 0.0442457880974, -0.0118721835978, -0.0177888197761, 0.0351775943888, 0.0348792107809, 0.0127082443141, -0.0055147874283, -0.025538492041, -0.0266140723472, -0.00351312980821, -0.00705954101235, -0.0071756277097, -0.0073123807337, 0.00388589850911, 0.00920641143732, 0.00675123073573}, {0.0, 0.60762891993, 0.0804538514268, -0.139045714146, -0.188318237239, -0.102850850916, -0.014327283229, 0.0095126479685, 0.00675439266545, -0.0369566468812, -0.0735379197498, -0.0464884257152, -0.00652653570483, 0.0460655599383, 0.0503985731174, -5.63018161884e-05, -0.0506993010893, -0.0519236737825, 0.00601034157191, 0.0565585753845, 0.0271235886591, -0.0124334855533, -0.0275977294885, -0.0178167665585, 0.0128169339437, 0.0370635121992, 0.0234037648427, 0.00539790260771, -0.0105614779717, -0.00455010484908, 0.0101491481873, 0.0220600470141}, 0.1771 }, { 32, /* fender_68 */ {0.952578805555, 0.423653323267, -0.299325586902, -0.181365977098, -0.00917621972835, -0.106211820702, -0.144312857058, -0.0664525836173, -0.0308777018884, -0.0289677657295, 0.06172127279, 0.0700934900581, 0.00309908907112, -0.00891983996273, -0.0687746247517, -0.0146407179784, 0.0264920122813, 0.0134951652977, 0.0480259959669, 0.021152058087, -0.0229395195318, 0.00306616207055, 0.015377268642, -0.0166969251715, -0.0472474005373, -0.0257631159809, -0.0298364749235, -0.0359529903186, -0.0228763062676, -0.0190698276841, -0.0481625561196, -0.024778494842}, {0.0, 0.373287747089, -0.379113471957, -0.162638822705, -0.0309789534425, -0.113942084113, -0.0746182251996, 0.00371088736605, -0.0311272559258, -0.0641468114835, -0.01820597504, -0.0106553201186, -0.0025754233332, 0.00779983208005, -0.0133002473609, 0.0474101909397, 0.0302769494631, -0.0206219756872, 0.00091004302278, 0.00989883124397, -0.00095818764248, -0.00710510898183, -0.0103772680579, 0.00636775505307, 0.0172954284337, 0.00560785607672, -0.00550757886611, 0.0349170637518, 0.033667260855, 0.0263631580776, 0.110816169944, 0.0551965257177}, 0.5267 }, { 32, /* marshall */ {0.632136921276, 0.487520501766, 0.267166936676, 0.0328329910029, -0.124746548218, -0.175922403211, -0.134056005594, -0.0275494615733, 0.0707349518645, 0.112423870345, 0.0758114749041, 0.0139250983739, -0.0210142361937, -0.00193163235992, 0.0197248569676, 0.0206461311409, -0.00897578938148, -0.0306233925441, -0.041776582616, -0.0398244883075, -0.0328395317644, -0.0101508675516, 0.00636535089023, 0.0217430701187, 0.0223553033142, 0.0237782685683, 0.0278909244449, 0.0469073547267, 0.0509466858461, 0.0336174039295, 0.0028829896058, 0.0114245696423}, {0.0, 0.618938053184, 0.180052941443, -0.1028119852, -0.19233134457, -0.14303971742, -0.0450998045919, 0.0341843500162, 0.0465086637485, 0.0071435730282, -0.0461779135605, -0.059013077843, -0.0284397368519, 0.0187689538251, 0.0341298347311, 0.0244703904826, 0.00720524642447, 0.00991307420138, 0.018738094495, 0.0275442994126, 0.0299092523536, 0.0339721143791, 0.0270175082759, 0.0151058732685, -0.00751060215331, -0.0236467101096, -0.0272347092017, -0.00812409176413, 0.0141531255726, 0.0270163512016, 0.00208457244433, -0.0784208903527}, 0.1132 }, { 32, /* mesa */ {0.462494284717, 0.393585742058, 0.303328992303, 0.181503108654, 0.0629173541037, -0.020681232006, -0.0571885284376, -0.0467796891544, -0.0276756897046, -0.00892844543715, 0.00204563746045, 0.0115134879366, 0.00106846505647, -0.0149439761237, -0.0330954690659, -0.0337794782369, -0.0276991983671, -0.0190072253549, -0.0324525139664, -0.0630355306227, -0.0999209480709, -0.111933999507, -0.110645947594, -0.092891889065, -0.0692697576821, -0.0450776510962, -0.0392851148349, -0.035324392499, -0.035403719608, -0.0376283525137, -0.0612971281858, -0.0900100571873}, {0.0, 0.56035020932, 0.29343466934, 0.0772363317707, -0.0530744622425, -0.0885361452358, -0.0589180077997, -0.00257855932105, 0.0334935643243, 0.0442328268628, 0.0294583386742, 0.00717959220156, -0.0175320543891, -0.0208128084726, -0.00373790944406, 0.0334761867029, 0.0627006023834, 0.0700861323961, 0.0416727224516, -0.000637024095321, -0.0357094622237, -0.0404012923223, -0.0285442599547, -0.00354190734239, 0.0184796761008, 0.0306524756002, 0.0181509660649, -0.00687913029057, -0.0393242377083, -0.0550286859069, -0.0375235630652, 0.0471541139774}, 0.2500 }, { 32, /* pro_jr */ {0.734249445521, 0.491537503216, 0.337459965314, 0.176462147927, 0.0276390917692, -0.0644515999868, -0.0972401016684, -0.0803985996088, -0.0428685363211, -0.0140919517701, -0.0337409328059, -0.0478897322188, -0.0362288411405, -0.0130597902066, -0.00582049410513, 0.0022469159791, -0.00964075940401, -0.0380828738621, -0.0763568061844, -0.089961400489, -0.0952731732008, -0.0895604973654, -0.101346765163, -0.119569610891, -0.128233125318, -0.109253322153, -0.0821678710293, -0.041620049917, -0.0245690004857, -0.0219634796685, -0.0419014341928, -0.0651369005252}, {0.0, 0.663188793345, 0.270439727768, 0.0190336508265, -0.0946822703696, -0.0888520332756, -0.0267575060227, 0.03588910806, 0.0599594346375, 0.041850528867, -0.00632721029526, -0.0244115687714, -0.0103162286821, 0.0119858957112, 0.0197992179523, 0.0238625339809, 0.0142267453341, 0.00296440492823, -0.00543873217766, -0.00014858213959, -0.00196572770138, -0.00750279035903, -0.0243069229182, -0.0285801812939, -0.0100437887585, 0.0259127459737, 0.0475587872734, 0.0497287926166, 0.0189008750066, -0.0156259358581, -0.0395277285226, -0.0325403937133}, 0.2500 }, }; Model32 CabinetII::models48000 [] = { { 1, /* identity */ {1}, {0}, 0.2500 }, { 32, /* matchless_off */ {0.751616859768, 0.455477674067, 0.236301148417, 0.0831041136969, -0.0271403780165, -0.100856772665, -0.105648770896, -0.0532306291781, 0.00532168244437, 0.0769562829624, 0.0998339309568, 0.0558038693299, -0.00395884124382, -0.0114310936324, -0.00035476064153, 0.0174339944264, 0.0326924241347, 0.0270873548662, -0.00429020715999, 0.00156163927912, 0.0110729521074, -0.00355947960002, -0.0197465530354, -0.00226491671692, 0.000562585645118, -0.0113374627036, -0.0395530054938, -0.0773637715714, -0.110300349197, -0.102242460538, -0.0802708342222, -0.0368542661019}, {0.0, 0.573363683971, 0.199471497847, -0.0100987131104, -0.10105055289, -0.104899707204, -0.0453437303875, 0.0227558858103, 0.0494210617945, 0.0469948522053, -0.000869801014908, -0.060632162889, -0.078080719406, -0.036500327, 0.00169111404144, 0.0161416041893, 0.00446588199593, -0.0256497606161, -0.052007235054, -0.0329954828689, -0.00846672300472, 0.00503287700528, 0.0225460696732, 0.0488769816297, 0.0448900330347, 0.0265213842101, 0.00867720983291, 0.00309440217249, 0.0106055108636, 0.0271743998844, 0.00790666559882, -0.0494793375024}, 0.0972 }, { 32, /* matchless_on */ {0.736752793274, 0.42789796886, 0.276149514408, 0.115820415827, -0.0320628697966, -0.121795204879, -0.142828258933, -0.0859958693575, -0.0176210080708, 0.0507262077785, 0.0760681727953, 0.0516030677135, -0.0156690595908, -0.0681826247693, -0.0944163538419, -0.0902627133447, -0.0823076517005, -0.0734934090705, -0.0692943287136, -0.0513490885216, -0.0305887683924, 0.00285704997857, 0.0369925466712, 0.0764037770343, 0.103822670992, 0.130505051247, 0.126189167018, 0.0870288516942, 0.00607091602923, -0.0716539223465, -0.122336223951, -0.107802803871}, {0.0, 0.60867772822, 0.226828570484, -0.0393069664502, -0.171393086666, -0.174192716258, -0.103361484389, -0.0132853346158, 0.028065787663, 0.0276791758057, -0.0093177316362, -0.0469821632045, -0.0621330892865, -0.0326281391326, 0.00952584471493, 0.0391305970452, 0.0343547401694, 0.0103991548433, -0.0167038490391, -0.0239538249183, -0.0200522931237, -0.00619037145571, 0.00112030880301, 0.00379111038519, -0.00425737141588, -0.00510101082859, -0.00618382168232, 0.00222622566288, 0.012234432496, 0.0240659559777, 0.00806553945799, -0.0500627523652}, 0.1292 }, { 32, /* superchamp */ {0.736144077022, 0.533697136818, 0.208223243775, 0.0105446749467, -0.115112852124, -0.167784888349, -0.118309369108, -0.0686796829989, -0.0320689348914, 0.0293577338735, 0.0228074058112, -0.00942321170451, -0.0247236206138, -0.0382275338893, -0.0220962904251, 0.0369265390908, 0.0652234781224, 0.0625494411772, 0.0203218939615, -0.0130049534934, 0.00776964355966, 0.0408524993227, 0.0187403995074, -0.00323676614764, -0.011729909669, -0.0146182789026, -0.00520348014418, 0.0251718299467, 0.0292350516935, 0.0265773340322, 0.0181154887123, 0.00421057480694}, {0.0, 0.610899704338, 0.116614493347, -0.107102211172, -0.17045907835, -0.125900190491, -0.0364778545046, 0.00268191730596, 0.00393059621292, -0.00442930148683, -0.0496456084728, -0.0641110080937, -0.0380451267687, -0.00269939732468, 0.0336320714582, 0.0473822399663, 0.00672982206906, -0.0376868259805, -0.0574242984978, -0.0235397064668, 0.0375124576452, 0.0561991090538, 0.0137707473486, -0.019313535496, -0.0308393757193, -0.0231851781013, -0.000359955230619, 0.0224262684571, 0.0140137052508, 0.000784652753983, -0.00886431320574, 0.00520310404507}, 0.1627 }, { 32, /* fender_68 */ {0.940499002611, 0.474406048513, -0.234027864276, -0.245068743132, -0.0275886925241, -0.0375353084644, -0.116020540053, -0.0788142311793, -0.0192628993487, -0.0208031874862, -0.036274591111, 0.0274443468203, 0.0248807593189, -0.00647753415313, 0.0123263590476, -0.0207149994271, -0.0169433327912, 0.0367748568855, 0.0157152144192, 0.0219763333967, 0.0220500063178, -0.0236599648747, -0.028051497911, 0.0300390624893, 0.0503387731847, 0.0200944005064, -0.0199651438354, -0.0189512878551, -0.0341641453641, -0.0429368448753, -0.00172415323758, 0.0187773541719}, {0.0, 0.438339721191, -0.314663980515, -0.200197131305, -0.0199447108206, -0.0806444850114, -0.112178302737, -0.0407327776523, -0.0162859630428, -0.04823028022, -0.0411406583855, 0.0181605305425, 0.0182296926714, 0.0118833391549, 0.00393162532115, -0.0208012980893, 0.0236552029021, 0.0440436249244, -0.015760708804, -0.00800215008051, 0.0264390446392, 0.0224755303713, -0.00488388416495, -0.0302927869543, -0.0389708286652, -0.0213138828272, -0.0196593434643, -0.0250837259433, -0.0171306364105, -0.00247139702561, -0.0442683480699, 0.00104076341183}, 0.4976 }, { 32, /* marshall */ {0.632432814914, 0.466340577796, 0.289928964438, 0.0873773815151, -0.0637714745665, -0.134210611966, -0.135503699906, -0.0734327294692, 0.00792058229369, 0.0760927054439, 0.0890306791735, 0.0595619591479, 0.00922265898468, -0.00784921065447, 0.00721708132165, 0.0350086110935, 0.0376247852781, 0.0202910905225, -0.00870656585895, -0.0201433438279, -0.0279367587019, -0.0245180701261, -0.0152282108474, 0.00828831561931, 0.026894267099, 0.0460507228179, 0.0479724909309, 0.0409446830643, 0.0201085872414, 0.00561387003945, -0.00753169056058, 0.000986659484038}, {0.0, 0.594136919296, 0.201493775156, -0.0716153113375, -0.180702317671, -0.160390621032, -0.0826806167453, 0.000697581661664, 0.0397029332137, 0.0299147550153, -0.0177304803895, -0.0570701545448, -0.0652412298089, -0.0298128518083, 0.0124560081161, 0.0355161884622, 0.0255626596849, 0.00762986123778, -0.00431800264305, 0.00420452150537, 0.0150803653129, 0.0291131391488, 0.0359312991789, 0.0364212054952, 0.0203516393338, 0.0022141464642, -0.0149317465975, -0.0121651677123, 0.00704936522966, 0.0353605810957, 0.0322793623201, -0.0307481566657}, 0.0996 }, { 32, /* mesa */ {0.495930895017, 0.376476419856, 0.303586589503, 0.197845120631, 0.0899987258287, 0.00535662962566, -0.0475751298521, -0.0519576953746, -0.0376515865627, -0.0168652310379, -0.00508935920432, 0.00888673824726, 0.0109356809664, 0.00654236486877, -0.0122417367265, -0.0265484743045, -0.0339837870474, -0.0233241554396, -0.0127914848925, -0.00515836827508, -0.0209864779144, -0.0475368628257, -0.0782299905969, -0.0909360283527, -0.0983527406681, -0.0938199589393, -0.0898861541372, -0.0810532718198, -0.0815503996776, -0.0796236089322, -0.0749972587191, -0.0599151413182}, {0.0, 0.534078389658, 0.294930996327, 0.0991032789063, -0.0272295349878, -0.0770236019127, -0.0705005212384, -0.0257307535864, 0.0146092582685, 0.0379865150974, 0.0359872042115, 0.0230902724993, -0.000725294921074, -0.0174606095957, -0.0236682462783, -0.00669570447944, 0.021362472642, 0.0512331674592, 0.0584309807453, 0.044407663655, 0.00900197651083, -0.0217065441135, -0.037007819832, -0.0257650758221, -0.00590170187955, 0.0194528583388, 0.0320489572473, 0.030386820278, 0.00581345215134, -0.02347217653, -0.0472400829369, -0.0430772235107}, 0.2500 }, { 32, /* pro_jr */ {0.767221028694, 0.44461349725, 0.324943328323, 0.187583401624, 0.0585707039826, -0.036895934974, -0.0893306767021, -0.0935390488322, -0.0758668196298, -0.0408583447944, -0.0309741335777, -0.0417509830741, -0.0550681782871, -0.0417048932451, -0.0295194484972, -0.0177059350466, -0.0189517349534, -0.0180093708399, -0.0336546809637, -0.0511188019942, -0.0648908298083, -0.0619349722444, -0.058573104994, -0.0470621645996, -0.0597723312001, -0.0855574645731, -0.109611426273, -0.113648127167, -0.112000636381, -0.0909222239483, -0.0727424833493, -0.0362189061166}, {0.0, 0.62970643913, 0.293410547935, 0.0578415012725, -0.0672697168081, -0.094466063484, -0.0596589574295, 0.000648321788151, 0.0432524054305, 0.0596811813862, 0.0366985835211, 0.0035102339371, -0.0156226319473, -0.00793362884142, 0.00010974226424, 0.00946937446156, 0.012432810986, 0.0166353982569, 0.00885441580212, 0.00176491241101, -0.00465797946213, -0.00706780418692, -0.0169292031721, -0.0217285491491, -0.0298358684941, -0.0214136482558, 0.00603804801211, 0.0432427970473, 0.0585065590431, 0.0472784452715, -0.00622503195681, -0.0778508047032}, 0.2500 }, }; Model32 CabinetII::models88200 [] = { { 1, /* identity */ {1}, {0}, 0.2500 }, { 32, /* matchless_off */ {0.581241782856, 0.351127495653, 0.293447498861, 0.203644809011, 0.122868019886, 0.0798136296596, 0.0627344813847, 0.0582949053671, 0.0495483041303, 0.0432630437098, 0.040778980166, 0.0502959955879, 0.06102889964, 0.0717641907075, 0.0748815766238, 0.0800912666293, 0.0851573668252, 0.0920643205477, 0.0863975575062, 0.0672325976358, 0.0316956083124, -0.00434276880274, -0.0353531287352, -0.0497775530225, -0.0549729489782, -0.0523697171754, -0.0527017492312, -0.0496529350336, -0.0432932459975, -0.02532771672, -0.00704167237723, 0.0048594343372}, {0.0, 0.527351085198, 0.306902134941, 0.121666659808, -0.000869395618695, -0.0590060725486, -0.0800321294614, -0.0812161497866, -0.0756902882293, -0.0586480829698, -0.035146960319, -0.00693669578546, 0.0137459416267, 0.0260709477944, 0.027142282904, 0.0255107789641, 0.0184912445046, 0.00787311464383, -0.012080806249, -0.0326630439808, -0.0479929895538, -0.0449384101923, -0.0257392906728, 0.00611234738181, 0.0331632616028, 0.0482685642726, 0.0424761053987, 0.0227984734932, -0.00689764194843, -0.0338856201523, -0.0506606159856, -0.036511204766}, 0.0505 }, { 32, /* matchless_on */ {0.754229081317, 0.28992460445, 0.25506113675, 0.205825249671, 0.149736304722, 0.0965453802519, 0.043937905171, 0.000434005345846, -0.0380077969732, -0.0648440473691, -0.0820185458195, -0.0804769096126, -0.067903181347, -0.0457545818062, -0.024506391213, 0.000276698483466, 0.0227732012504, 0.0462273060245, 0.0612627993168, 0.0704402843546, 0.0668070265589, 0.0560526861609, 0.0360109823522, 0.0171596012087, -0.00254977646019, -0.0169995310247, -0.0326802854744, -0.0431803638863, -0.0527933574758, -0.0537365642607, -0.0484658084207, -0.0264410770067}, {0.0, 0.473323278291, 0.304447812378, 0.156758267418, 0.0407417557578, -0.0375541115795, -0.084174169143, -0.0995647273704, -0.0953485009639, -0.0745284443813, -0.047611748504, -0.0160860230858, 0.00812108121932, 0.022520582633, 0.0218183858734, 0.0139436350809, -0.000684654971314, -0.0149097687302, -0.0306604197839, -0.0406022715147, -0.0468128179642, -0.0432623683601, -0.0334406989274, -0.0143890226248, 0.00558711901527, 0.0240338814196, 0.0313772357088, 0.0288551286613, 0.0119537593072, -0.0137695197232, -0.0487934292115, -0.0830489298052}, 0.0977 }, { 32, /* superchamp */ {0.564442248694, 0.417375378841, 0.328112930961, 0.184087902524, 0.0606877879374, -0.000888211396509, -0.0240417949471, -0.0386494407725, -0.0623924578122, -0.077697122496, -0.0771755477917, -0.0625887925073, -0.0567602691995, -0.0606788148043, -0.0653972735044, -0.0482177616776, -0.0134706312764, 0.0255178539984, 0.0454519306153, 0.0488386058553, 0.040370247527, 0.0309888915369, 0.0118591255626, -0.0166655766779, -0.0524886753799, -0.0735764853592, -0.0712539506456, -0.0409275497673, 2.56200623182e-05, 0.0407426819337, 0.0605288133085, 0.045387360314}, {0.0, 0.58401876341, 0.301866612426, 0.0749234792796, -0.0512250579262, -0.0884380547633, -0.0859341509964, -0.0715039798048, -0.0533786975427, -0.0228940420774, 0.00895370138835, 0.029234699873, 0.0249642271923, 0.00815472752255, -0.00852123193886, -0.013874697166, -0.0177655062032, -0.0244009337209, -0.0348366549323, -0.0341041586519, -0.0199202543104, 0.0049040564053, 0.0228786117828, 0.0307412470467, 0.0270357914745, 0.0202102683028, 0.00600213627849, -0.0132416519396, -0.035306113292, -0.0400865958576, -0.0122081055945, 0.061547236583}, 0.0940 }, { 32, /* fender_68 */ {0.636561915308, 0.539655264394, 0.306940867236, -0.00798666364572, -0.2010016693, -0.196429989976, -0.0871390659769, 0.0058320328314, 0.0205797064122, -0.0137249327682, -0.0511542488948, -0.0559233911299, -0.0365269209833, -0.00933607201861, 0.00259528983031, 0.000820508580746, -0.014655020786, -0.0298656923381, -0.0363760565053, -0.0164103072662, 0.0180980103038, 0.0427307277871, 0.0289045601723, -0.00365819240342, -0.0221033761769, -0.00613002097262, 0.0137359639094, 0.0126374765575, -0.0109039821774, -0.022164851067, -0.00644276895272, 0.0406179316828}, {0.0, 0.660098640191, 0.135995579965, -0.18643602906, -0.21362553946, -0.0765656086032, 0.0304158765248, 0.0317377501315, -0.0306547118834, -0.0742288333657, -0.0716640946732, -0.0400798411024, -0.016998894935, -0.0119106601837, -0.0209707717803, -0.0285105267284, -0.033043355156, -0.03016836978, -0.0235112391223, -0.0121431367424, -0.0083970652792, -0.0121227777881, -0.0179437299751, -0.0103936611338, 0.000810102779011, -0.000708784846704, -0.0234941025684, -0.0371015701952, -0.0180247391719, 0.0220761118738, 0.0243771530897, -0.0421517051891}, 0.2672 }, { 32, /* marshall */ {0.487781223472, 0.313482625917, 0.286350463893, 0.224656866466, 0.146402144474, 0.0763559834141, 0.0205530599391, -0.0145817074955, -0.0366424375139, -0.0445785898927, -0.0458160857045, -0.037336889106, -0.0251791786851, -0.00575399966305, 0.0148942739024, 0.0391750282507, 0.0589388969198, 0.0752812491289, 0.0811254049966, 0.0801917939348, 0.0685526132261, 0.0533549680139, 0.0342811257343, 0.0215399491933, 0.0147049499229, 0.0198301270011, 0.030982725155, 0.0503002628087, 0.0693130546132, 0.0867905978395, 0.0881891739024, 0.0641468491285}, {0.0, 0.51943795847, 0.326729354403, 0.149229797985, 0.0109767104297, -0.0732768493116, -0.111088974509, -0.110789539541, -0.0898934114003, -0.0564578047856, -0.0231004313356, 0.0069673688738, 0.0254240918116, 0.0337510299271, 0.0282514883492, 0.0147089116391, -0.00647743824673, -0.0269028751263, -0.0446349197143, -0.0510564142456, -0.0478791675617, -0.0324832722564, -0.0121393859238, 0.0104982033447, 0.0241412382054, 0.026038551433, 0.00994372364326, -0.0158545375622, -0.0436236854665, -0.0537883431888, -0.032574614307, 0.0387767610956}, 0.0666 }, { 32, /* mesa */ {0.800744790951, 0.174351736281, 0.162047205857, 0.138794638546, 0.105850412073, 0.0723656260485, 0.0365740092219, 0.00431957094182, -0.0274260159266, -0.052813754463, -0.0747002681782, -0.0875980404567, -0.0959206315285, -0.0964326627017, -0.0951211930444, -0.0890916136798, -0.0839336477818, -0.0759587618493, -0.0699911420952, -0.0618103150195, -0.0562569921852, -0.0497246788081, -0.0474425366429, -0.045118852226, -0.0466084665482, -0.0466183009403, -0.048518031551, -0.0465434705359, -0.0436608634155, -0.0338725172886, -0.0202008830722, 0.0028064387038}, {0.0, 0.348283848037, 0.278266186344, 0.208315992656, 0.142238507639, 0.0877418515218, 0.0426721771028, 0.0101211230173, -0.0142620082039, -0.0279206093939, -0.0353541175487, -0.0344380562925, -0.030780249931, -0.0230674032021, -0.016830370528, -0.00961683532214, -0.00530786189015, -0.000225073976316, 0.00276994164541, 0.00775476255757, 0.0114020240885, 0.0168731013913, 0.0203623771917, 0.0249313385656, 0.0267810408235, 0.0287888955038, 0.026286558388, 0.0210452426156, 0.00782753651909, -0.0119982689793, -0.0444362907999, -0.0880582917654}, 0.2500 }, { 32, /* pro_jr */ {0.909835294941, 0.237116967883, 0.220493213781, 0.188296175986, 0.145804855731, 0.1035213914, 0.0593519550104, 0.018535542445, -0.0211984146917, -0.0519769598497, -0.0754321013216, -0.0869433378891, -0.0920887014799, -0.087865027182, -0.0792907797887, -0.0637463287733, -0.0482713945314, -0.0325419993651, -0.0236382913314, -0.0187673840883, -0.0211003792763, -0.0242608362201, -0.0299312006336, -0.032972160693, -0.038384284548, -0.0433373155719, -0.0522438990617, -0.0598215574684, -0.0680342990137, -0.0706075753658, -0.0696540637908, -0.0592163425206}, {0.0, 0.437589362895, 0.316542061632, 0.204591087565, 0.109610647885, 0.0395709089276, -0.0101168883103, -0.0392507441308, -0.0536854447628, -0.0525994961208, -0.0429181531663, -0.0263178649123, -0.0108114446263, 0.00361113168474, 0.0124368978113, 0.0183164472387, 0.0173632458965, 0.0133080282174, 0.00451776800884, -0.0027292732446, -0.0084152300302, -0.00649797485834, 0.000343904158769, 0.0135853277076, 0.0260015642816, 0.0368350330248, 0.0397116093504, 0.035854103932, 0.0201173890247, -0.00598389310382, -0.0479894271495, -0.10412912505}, 0.2500 }, }; Model32 CabinetII::models96000 [] = { { 1, /* identity */ {1}, {0}, 0.2500 }, { 32, /* matchless_off */ {0.576442585125, 0.306361432085, 0.256653772545, 0.177316081395, 0.0989986029973, 0.0501811139283, 0.0263950297254, 0.0211066378234, 0.0164669956215, 0.0145939695187, 0.0131915301884, 0.0224302343035, 0.0359395096833, 0.0545608587271, 0.0665798797365, 0.0764638706987, 0.0822020713116, 0.0937583388117, 0.104705110174, 0.114731370205, 0.110211793209, 0.0934363192015, 0.0618719406527, 0.0288732783262, -0.00358352145982, -0.0259155247732, -0.0441021836484, -0.0555310772717, -0.0670712283056, -0.0677576234809, -0.0520883036287, -0.00170675690763}, {0.0, 0.508669145362, 0.322479739387, 0.156892646838, 0.035020841423, -0.0347440829067, -0.0701806136041, -0.0825008530376, -0.0845801358275, -0.0733688333095, -0.0530323023958, -0.0234536559399, 0.00360324038712, 0.0244342060698, 0.0314240125922, 0.0309189326677, 0.0230090442585, 0.0145937492998, 0.00103582471628, -0.0152025378362, -0.0363464186106, -0.0511215757185, -0.0557855361088, -0.0408742372067, -0.0130066718085, 0.023938151261, 0.0530188010691, 0.0671220652663, 0.0540529792683, 0.0164681954699, -0.0469180610472, -0.125461903689}, 0.0494 }, { 32, /* matchless_on */ {0.941618036526, 0.239866043796, 0.218739659026, 0.1855624175, 0.143119285622, 0.098285134927, 0.049823345838, 0.00491072985196, -0.0372254815054, -0.0706502777402, -0.0969381684649, -0.109632530255, -0.11098328422, -0.0987132407502, -0.080379871629, -0.0559715185867, -0.0315381582245, -0.00496109501612, 0.0171690268626, 0.0357166271116, 0.0446464487104, 0.0469813895302, 0.0390401137056, 0.0262125456401, 0.00716840214371, -0.0108017316884, -0.028794724005, -0.0413800680682, -0.0514241182155, -0.0535943709963, -0.0501288491812, -0.0356807796594}, {0.0, 0.436259688495, 0.303343311728, 0.180401443304, 0.0755768977826, -0.00298141418929, -0.057401860201, -0.0849229021135, -0.0921029201246, -0.0808710238831, -0.0601563297725, -0.031853887802, -0.00462566662184, 0.0189321520075, 0.0307568282097, 0.0327103981415, 0.0234112049746, 0.00941773902223, -0.00880302596543, -0.024628145492, -0.0377321989901, -0.0420727660837, -0.0390726798885, -0.0257996845469, -0.00726121684029, 0.0160981879938, 0.0352540092546, 0.0464046029779, 0.0397882340227, 0.0142875216435, -0.0354360590043, -0.105598440048}, 0.0651 }, { 32, /* superchamp */ {0.598483659576, 0.392119614921, 0.324128816827, 0.207253363884, 0.0944270102152, 0.0269672658419, -0.00338080597527, -0.0154386943775, -0.0337854523788, -0.0528375781544, -0.0668037964282, -0.0644824272507, -0.0581122839458, -0.053620685433, -0.05941095465, -0.0599621297144, -0.0476930600655, -0.0143047492128, 0.0237480623761, 0.0559779339589, 0.0689887990541, 0.0713731354487, 0.0647181254244, 0.0560812069922, 0.0357682629483, 0.00706245212017, -0.0286615791021, -0.052644819201, -0.0590210498647, -0.041747604451, -0.0168191702228, 0.00465326173164}, {0.0, 0.555306548005, 0.304384349565, 0.0955876011242, -0.032790937176, -0.0803585769889, -0.0834509085546, -0.069736664388, -0.0558345347225, -0.0359974911327, -0.012046069248, 0.0128302949846, 0.0234882264814, 0.0187166685281, 0.00137741738003, -0.0128825824672, -0.0213054248788, -0.0224842024484, -0.0275110748888, -0.0335451251688, -0.0384673765875, -0.0306779974376, -0.0133415017904, 0.00900611383706, 0.0222626768741, 0.0253127037082, 0.0166771042914, 0.00577574428968, -0.00773567900765, -0.0175688399329, -0.021338142267, -0.00199213694503}, 0.0903 }, { 32, /* fender_68 */ {0.61042243584, 0.519167522444, 0.338455322638, 0.0598120788559, -0.155008295955, -0.209996385603, -0.142681005045, -0.0444570079209, 0.00529240289956, 7.6909429568e-05, -0.03354602127, -0.0535687744411, -0.049519403779, -0.0238846177015, -0.000920606029846, 0.010434338433, 0.002228774067, -0.0140907683377, -0.035872619499, -0.0481212880009, -0.0457673542097, -0.0191076772359, 0.0133771714316, 0.0322386165839, 0.0178556687427, -0.0095701287891, -0.0237842865664, -0.00484822472333, 0.0227424513401, 0.0316309750773, 0.00586735474858, -0.0235815475244}, {0.0, 0.658865798836, 0.184872779539, -0.137135473027, -0.210003150161, -0.108221769211, 0.0110221508749, 0.0526622948184, 0.0145697157163, -0.0398151102571, -0.0659793146563, -0.0534131399862, -0.0284152189248, -0.0091286709165, -0.00636536651116, -0.00986403078301, -0.0155052371976, -0.0165973690878, -0.018011376701, -0.0154898840826, -0.0109104131649, -0.00195757926804, 0.00204116721073, 0.00157889259535, -0.00328499795407, -0.00244356007769, -0.00227606009504, -0.00603112779608, -0.0173439459505, -0.0176299504059, -0.00210293292278, 0.00864548631897}, 0.2359 }, { 32, /* marshall */ {0.519039714244, 0.28397066065, 0.263752501402, 0.216763224092, 0.153202060875, 0.093498887372, 0.0418092813984, 0.00649080672527, -0.0187685887985, -0.0313725205166, -0.0386046242494, -0.0368255569808, -0.0319398932261, -0.0190867195417, -0.00429792893597, 0.0171895051396, 0.038509421914, 0.0625518463058, 0.0812007261611, 0.0971807963934, 0.10334087256, 0.104223746243, 0.0947810421376, 0.0820175331544, 0.0638964900287, 0.049888405421, 0.0379912291508, 0.0353343445924, 0.036271348736, 0.0455456726476, 0.0571810093304, 0.0753869660867}, {0.0, 0.495552580909, 0.326384725738, 0.167649233033, 0.0373913746446, -0.049802990613, -0.0971841927371, -0.108389008817, -0.0971430950292, -0.0702481334571, -0.0402478232447, -0.00995144228925, 0.0120995492915, 0.0263638891687, 0.0284733804008, 0.0226883648689, 0.00733748451124, -0.0103570201666, -0.0304762029918, -0.0447374261541, -0.0534169560389, -0.0509721172171, -0.0411315716449, -0.0225994268992, -0.00306083571223, 0.0162408742504, 0.0258967736277, 0.0250750690024, 0.00862389563333, -0.0164131934788, -0.0455336929843, -0.0629205840552}, 0.0663 }, { 32, /* mesa */ {0.816556812848, 0.150293117891, 0.141795487793, 0.124839522537, 0.099196755702, 0.0723627786971, 0.0428519140057, 0.0161310830227, -0.0110923701697, -0.034007587359, -0.0554568663798, -0.070468417213, -0.0823376819593, -0.0871844200317, -0.0898440433576, -0.0874713568897, -0.0851052646307, -0.0795934648554, -0.075427699709, -0.0687589148326, -0.0639930873009, -0.0572185996408, -0.0529180674694, -0.0475806410473, -0.0456514163291, -0.0429752541034, -0.0432519558816, -0.0416267292155, -0.0408422393067, -0.0352236824279, -0.0269876908459, -0.0103181623672}, {0.0, 0.324884890574, 0.268628249933, 0.210962607294, 0.15379956812, 0.104238396719, 0.0608732030517, 0.0272239220101, -0.000475953058616, -0.019347999351, -0.0332735025431, -0.039418716712, -0.0418327023679, -0.0385575041649, -0.0342524288567, -0.0267537524134, -0.0202714386094, -0.0115967221036, -0.00421419915726, 0.0052675530631, 0.0133773574491, 0.0230906449798, 0.0303465968119, 0.0374618799867, 0.0402738707573, 0.0409671902591, 0.0352080031286, 0.0253938319794, 0.0070273986645, -0.0175302180141, -0.0528396401673, -0.0967034944448}, 0.2500 }, { 32, /* pro_jr */ {0.925365759135, 0.205121186223, 0.193282167511, 0.170964672217, 0.139026712618, 0.10615970874, 0.0712170483592, 0.0387785989803, 0.00565122246474, -0.022529589284, -0.0474765753603, -0.0638195347354, -0.0750789855745, -0.0781013105481, -0.0774023301337, -0.0698851353181, -0.0601759362765, -0.0460666153988, -0.033417255906, -0.0207620686126, -0.0136627961657, -0.008873845834, -0.00924040700271, -0.00959897299234, -0.0122760927684, -0.0134131792383, -0.0169861222268, -0.0197237904964, -0.0247929394164, -0.0274056341581, -0.0290372582108, -0.0230858292646}, {0.0, 0.384047660947, 0.296120799911, 0.212432468703, 0.136561707438, 0.0758675413252, 0.0277844248084, -0.00596868040294, -0.0302987351926, -0.0432929213814, -0.0490562834943, -0.0462652470517, -0.0403753213236, -0.030690892845, -0.022025662253, -0.0121577019191, -0.00457323646437, 0.00324370289428, 0.00777535572758, 0.0119010287281, 0.0130997070818, 0.0155933691883, 0.0177344547654, 0.023362610354, 0.028693981754, 0.0347549373256, 0.0352150834795, 0.0303066390313, 0.0145055938776, -0.0110543984149, -0.0508137742561, -0.102480420772}, 0.2500 }, };
33,838
C++
.h
225
146.382222
573
0.770929
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,124
SweepVF.h
LMMS_lmms/plugins/LadspaEffect/caps/SweepVF.h
/* SweepVF.h Copyright 2004-7 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ SweepVFI, a lorenz fractal modulating the cutoff frequency of a state-variable (ladder) filter. SweepVFII, the same with Q being modulated by a second fractal. AutoWah, SVF being modulated by 'instant' amplitude (envelope). */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. */ #ifndef _SWEEP_VF_H_ #define _SWEEP_VF_H_ #include "dsp/SVF.h" #include "dsp/Lorenz.h" #include "dsp/Roessler.h" #include "dsp/RMS.h" #include "dsp/BiQuad.h" #include "dsp/OnePole.h" class SweepVFI : public Plugin { public: double fs; /* svf parameters */ sample_t f, Q; /* needs to be a power of two */ enum { BLOCK_SIZE = 32 }; DSP::StackedSVF<1,2> svf; DSP::Lorenz lorenz; template <sample_func_t F> void one_cycle (int frames); public: static PortInfo port_info []; void init(); void activate(); void run (int n) { one_cycle<store_func> (n); } void run_adding (int n) { one_cycle<adding_func> (n); } }; class SweepVFII : public Plugin { public: /* svf parameters */ sample_t f, Q; /* needs to be a power of two */ enum { BLOCK_SIZE = 32 }; DSP::StackedSVF<1,2> svf; DSP::Lorenz lorenz1; DSP::Lorenz lorenz2; template <sample_func_t F> void one_cycle (int frames); public: static PortInfo port_info []; void init(); void activate(); void run (int n) { one_cycle<store_func> (n); } void run_adding (int n) { one_cycle<adding_func> (n); } }; /* //////////////////////////////////////////////////////////////////////// */ class AutoWah : public Plugin { public: double fs; /* svf parameters */ sample_t f, Q; /* needs to be a power of two */ enum { BLOCK_SIZE = 32 }; DSP::StackedSVF<1,2> svf; DSP::RMS rms; DSP::BiQuad filter; DSP::OnePoleHP hp; template <sample_func_t F> void one_cycle (int frames); public: static PortInfo port_info []; void init(); void activate(); void run (int n) { one_cycle<store_func> (n); } void run_adding (int n) { one_cycle<adding_func> (n); } }; #endif /* _SWEEP_VF_H_ */
2,880
C++
.h
119
21.176471
78
0.675147
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,125
Lorenz.h
LMMS_lmms/plugins/LadspaEffect/caps/Lorenz.h
/* Lorenz.h Copyright 2004-11 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ turns the state of a Lorenz fractal into sound. */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. */ #ifndef _LORENZ_H_ #define _LORENZ_H_ #include "dsp/Lorenz.h" class Lorenz : public Plugin { public: sample_t h, gain; DSP::Lorenz lorenz; template <sample_func_t F> void one_cycle (int frames); public: static PortInfo port_info []; void init(); void activate() { gain = getport(4); } void run (int n) { one_cycle<store_func> (n); } void run_adding (int n) { one_cycle<adding_func> (n); } }; #endif /* _LORENZ_H_ */
1,356
C++
.h
46
26.717391
66
0.733333
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,126
Cabinet.h
LMMS_lmms/plugins/LadspaEffect/caps/Cabinet.h
/* Cabinet.h Copyright 2002-5 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ CabinetI - 16th order IIR filters modeled after various impulse responses from Steve Harris' 'imp' plugin. Limited to 44.1 kHz sample rate. CabinetII - 32nd order IIR filters modeled after the same impulse responses using a different algorithm. Versions for 44.1 / 48 / 88.2 / 96 kHz sample rates, switched at runtime. */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. */ #ifndef _CABINET_H_ #define _CABINET_H_ #include "dsp/util.h" /* cabinet_float sets the data type used for the IIR history and thus the * computing precision. doubles tend to make the sound more vivid and lively. * You can squeeze out a few extra cycles by making this 'float' if needed. * Be warned though that CabinetII has not been tested with 32-bit floats and * might become unstable due to the lower computing precision. */ typedef double cabinet_float; typedef struct { int n; cabinet_float a[16], b[16]; float gain; } Model16; typedef struct { int n; cabinet_float a[32], b[32]; float gain; } Model32; class CabinetI : public Plugin { public: sample_t gain; static Model16 models []; int model; void switch_model (int m); int n, h; cabinet_float * a, * b; cabinet_float x[16], y[16]; template <sample_func_t F> void one_cycle (int frames); public: static PortInfo port_info []; void init(); void activate(); void run (int n) { one_cycle<store_func> (n); } void run_adding (int n) { one_cycle<adding_func> (n); } }; /* Second version with 32nd order filters precalculated for * 44.1 / 48 / 88.2 / 96 kHz sample rates */ class CabinetII : public Plugin { public: sample_t gain; static Model32 models44100 []; static Model32 models48000 []; static Model32 models88200 []; static Model32 models96000 []; Model32 * models; int model; void switch_model (int m); int n, h; cabinet_float * a, * b; cabinet_float x[32], y[32]; template <sample_func_t F> void one_cycle (int frames); public: static PortInfo port_info []; sample_t adding_gain; void init(); void activate(); void run (int n) { one_cycle<store_func> (n); } void run_adding (int n) { one_cycle<adding_func> (n); } }; #endif /* _CABINET_H_ */
3,022
C++
.h
103
26.514563
77
0.725756
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,127
Amp.h
LMMS_lmms/plugins/LadspaEffect/caps/Amp.h
/* Amp.h Copyright 2002-9 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ Oversampled tube amplifier emulation. */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. */ #ifndef _AMP_H_ #define _AMP_H_ #include "dsp/util.h" #include "dsp/OnePole.h" #include "dsp/BiQuad.h" #include "dsp/TwelveAX7.h" #include "dsp/Roessler.h" #include "dsp/FIR.h" #include "dsp/sinc.h" #include "dsp/windows.h" #include "dsp/RBJ.h" #include "dsp/Eq.h" #include "dsp/ToneStack.h" class AmpStub : public Plugin { public: DSP::TwelveAX7_3 tube; sample_t drive, i_drive; struct { /* gain (remember current setting and fade to port setting in run) */ double g; /* should also do this for temperature to remove another potential * source of zippering, but that would be overkill, at the cost of * at least one pow() per block. */ } current; /* input is hipass-filtered first */ DSP::OnePoleHP dc_blocker; enum { OVERSAMPLE = 8, FIR_SIZE = 64, }; /* antialias filters */ DSP::FIRUpsampler up; DSP::FIR down; AmpStub() : up (FIR_SIZE, OVERSAMPLE), down (FIR_SIZE, up.c) { } void init (bool adjust_downsampler = false); inline sample_t power_transfer (sample_t a) { return i_drive * (a - drive * fabs (a) * a); } }; /* /////////////////////////////////////////////////////////////////////// */ class PreampIII : public AmpStub { public: template <sample_func_t F, int OVERSAMPLE> void one_cycle (int frames); DSP::BiQuad filter; public: static PortInfo port_info[]; sample_t adding_gain; void init(); void activate() { current.g = 1; filter.reset(); up.reset(); down.reset(); dc_blocker.reset(); } void run (int n) { one_cycle<store_func, OVERSAMPLE> (n); } void run_adding (int n) { one_cycle<adding_func, OVERSAMPLE> (n); } }; /* /////////////////////////////////////////////////////////////////////// */ class AmpIII : public AmpStub { public: template <sample_func_t F, int OVERSAMPLE> void one_cycle (int frames); DSP::BiQuad filter; public: static PortInfo port_info[]; sample_t adding_gain; void init(); void activate() { current.g = 1; up.reset(); down.reset(); dc_blocker.reset(); filter.reset(); } void run (int n) { one_cycle<store_func, OVERSAMPLE> (n); } void run_adding (int n) { one_cycle<adding_func, OVERSAMPLE> (n); } }; /* /////////////////////////////////////////////////////////////////////// */ typedef struct {float center, Q, adjust;} PreampBand; class ToneControls { public: sample_t eq_gain[4]; DSP::Eq<4> eq; static PreampBand bands[4]; public: void init (double _fs); void activate (sample_t **); inline void start_cycle (sample_t ** ports, double one_over_n) { for (int i = 0; i < 4; ++i) { if (*ports[i] == eq_gain[i]) { eq.gf[i] = 1; continue; } eq_gain[i] = *ports [i]; double want = get_band_gain (i, eq_gain[i]); eq.gf[i] = pow (want / eq.gain[i], one_over_n); } } double get_band_gain (int i, double g); void set_band_gain (int i, float g); inline sample_t process (sample_t x) { return eq.process (x); } }; /* /////////////////////////////////////////////////////////////////////// */ class PreampIV : public PreampIII { public: ToneControls tone; template <sample_func_t F, int OVERSAMPLE> void one_cycle (int frames); public: static PortInfo port_info[]; sample_t adding_gain; void init(); void activate(); void run (int n) { one_cycle<store_func, OVERSAMPLE> (n); } void run_adding (int n) { one_cycle<adding_func, OVERSAMPLE> (n); } }; /* /////////////////////////////////////////////////////////////////////// */ class AmpIV : public AmpStub { public: ToneControls tone; template <sample_func_t F, int OVERSAMPLE> void one_cycle (int frames); public: static PortInfo port_info[]; sample_t adding_gain; void init(); void activate() { current.g = 1; tone.activate (ports + 3); up.reset(); down.reset(); dc_blocker.reset(); } void run (int n) { one_cycle<store_func, OVERSAMPLE> (n); } void run_adding (int n) { one_cycle<adding_func, OVERSAMPLE> (n); } }; /* /////////////////////////////////////////////////////////////////////// */ class AmpV : public AmpStub { public: template <sample_func_t F, int OVERSAMPLE> void one_cycle (int frames); DSP::BiQuad filter[3]; sample_t cut, tone; /* supply voltage sag */ sample_t supply; DSP::BiQuad power_cap[2]; public: static PortInfo port_info[]; sample_t adding_gain; void init(); void activate() { current.g = 1; for (int i = 0; i < 2; ++i) filter[i].reset(), power_cap[i].reset(); up.reset(); down.reset(); dc_blocker.reset(); cut = 2; supply = 0.; tone = -1; /* causes initialisation of the filter at first cycle */ } void run (int n) { one_cycle<store_func, OVERSAMPLE> (n); } void run_adding (int n) { one_cycle<adding_func, OVERSAMPLE> (n); } }; /* /////////////////////////////////////////////////////////////////////// */ class AmpVTS : public AmpStub { public: DSP::ToneStack tonestack; template <sample_func_t F, int OVERSAMPLE> void one_cycle (int frames); sample_t cut, tone; /* supply voltage sag */ sample_t supply; DSP::BiQuad power_cap[2]; public: static PortInfo port_info[]; sample_t adding_gain; void init(); void activate() { current.g = 1; for (int i = 0; i < 2; ++i) power_cap[i].reset(); up.reset(); down.reset(); dc_blocker.reset(); cut = 2; supply = 0.; } void run (int n) { one_cycle<store_func, OVERSAMPLE> (n); } void run_adding (int n) { one_cycle<adding_func, OVERSAMPLE> (n); } }; #endif /* _AMP_H_ */
6,698
C++
.h
284
20.010563
77
0.599841
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,128
Roessler.h
LMMS_lmms/plugins/LadspaEffect/caps/Roessler.h
/* Roessler.h Copyright 2004-11 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ turns a Roessler fractal into sound. */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. */ #ifndef _ROESSLER_H_ #define _ROESSLER_H_ #include "dsp/Roessler.h" class Roessler : public Plugin { public: sample_t h, gain; DSP::Roessler roessler; template <sample_func_t F> void one_cycle (int frames); public: static PortInfo port_info []; sample_t adding_gain; void init(); void activate() { gain = getport(4); } void run (int n) { one_cycle<store_func> (n); } void run_adding (int n) { one_cycle<adding_func> (n); } }; #endif /* _ROESSLER_H_ */
1,384
C++
.h
47
26.702128
66
0.737842
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,129
Click.h
LMMS_lmms/plugins/LadspaEffect/caps/Click.h
/* Click.h Copyright 2004-5 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ units perpetually repeating a recorded sample. */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. */ #ifndef _CLICK_H_ #define _CLICK_H_ #include "dsp/OnePole.h" #include "dsp/util.h" class ClickStub : public Plugin { public: sample_t bpm; float * wave; int N; /* number of samples in wave */ DSP::OnePoleLP lp; int period; /* frames remaining in period */ int played; /* frames played from sample */ template <sample_func_t F> void one_cycle (int frames); public: static PortInfo port_info []; void init (float * _wave, int _N); void activate() { played = 0; period = 0; } void run (int n) { one_cycle<store_func> (n); } void run_adding (int n) { one_cycle<adding_func> (n); } }; class Click : public ClickStub { public: void init(); }; class CEO : public ClickStub { public: void init(); static PortInfo port_info []; }; class Dirac : public ClickStub { public: void init(); static PortInfo port_info []; }; #endif /* _CLICK_H_ */
1,809
C++
.h
74
21.810811
66
0.720562
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
true
true
false
false
false
false
false
false
20,130
Chorus.h
LMMS_lmms/plugins/LadspaEffect/caps/Chorus.h
/* Chorus.h Copyright 2004-5 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ mono and stereo chorus/flanger units, traditional designs and some differentiated a bit further. */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. */ #ifndef _CHORUS_H_ #define _CHORUS_H_ #include "dsp/Sine.h" #include "dsp/Roessler.h" #include "dsp/Lorenz.h" #include "dsp/Delay.h" #include "dsp/OnePole.h" #include "dsp/BiQuad.h" #include "dsp/RBJ.h" class ChorusStub : public Plugin { public: sample_t time, width, rate; }; class ChorusI : public ChorusStub { public: DSP::Sine lfo; DSP::Delay delay; DSP::DelayTapA tap; template <sample_func_t> void one_cycle (int frames); public: static PortInfo port_info []; void init() { rate = .15; delay.init ((int) (.040 * fs)); } void activate() { time = 0; width = 0; rate = *ports[3]; delay.reset(); tap.reset(); lfo.set_f (rate, fs, 0); } void run (int n) { one_cycle<store_func> (n); } void run_adding (int n) { one_cycle<adding_func> (n); } }; class StereoChorusI : public ChorusStub { public: sample_t rate; sample_t phase; DSP::Delay delay; struct { DSP::Sine lfo; DSP::DelayTapA tap; } left, right; template <sample_func_t> void one_cycle (int frames); public: static PortInfo port_info []; void init() { rate = .15; phase = .5; /* pi */ delay.init ((int) (.040 * fs)); } void activate() { time = 0; width = 0; delay.reset(); left.tap.reset(); right.tap.reset(); left.lfo.set_f (rate, fs, 0); right.lfo.set_f (rate, fs, phase * M_PI); } void run (int n) { one_cycle<store_func> (n); } void run_adding (int n) { one_cycle<adding_func> (n); } }; /* //////////////////////////////////////////////////////////////////////// */ #define FRACTAL_RATE 0.02 /* fractally modulated Chorus units */ class FracTap { public: DSP::Lorenz f1; DSP::Roessler f2; DSP::OnePoleLP lp; void init (double fs) { lp.set_f (30. / fs); f1.init (.001, frandom()); f2.init (.001, frandom()); } void set_rate (sample_t r) { f1.set_rate (r * FRACTAL_RATE); f2.set_rate (3.3 * r * FRACTAL_RATE); } /* t = time, w = width, should inline nicely */ sample_t get (DSP::Delay & d, double t, double w) { double m = lp.process (f1.get() + .3 * f2.get()); return d.get_cubic (t + w * m); } }; class ChorusII : public ChorusStub { public: enum { Taps = 1 }; FracTap taps[Taps]; DSP::BiQuad filter; DSP::Delay delay; template <sample_func_t> void one_cycle (int frames); void set_rate (sample_t r) { rate = r; for (int i = 0; i < Taps; ++i) { taps[i].set_rate (rate * (i * FRACTAL_RATE) / Taps); // fprintf (stderr, "[%d] %.3f\n", i, (rate * (i * FRACTAL_RATE) / Taps)); } } public: static PortInfo port_info []; void init() { delay.init ((int) (.040 * fs)); for (int i = 0; i < Taps; ++i) taps[i].init (fs); DSP::RBJ::HiShelve (1000. / fs, 1., 6, filter.a, filter.b); } void activate() { time = 0; width = 0; set_rate (*ports[3]); delay.reset(); filter.reset(); } void run (int n) { one_cycle<store_func> (n); } void run_adding (int n) { one_cycle<adding_func> (n); } }; class StereoChorusII : public ChorusStub { public: sample_t rate; sample_t phase; DSP::Delay delay; struct { DSP::Roessler fractal; DSP::OnePoleLP lfo_lp; DSP::DelayTapA tap; } left, right; template <sample_func_t> void one_cycle (int frames); void set_rate (sample_t r) { rate = r; left.fractal.set_rate (rate * FRACTAL_RATE); right.fractal.set_rate (rate * FRACTAL_RATE); left.lfo_lp.set_f (3. / fs); right.lfo_lp.set_f (3. / fs); } public: static PortInfo port_info []; sample_t adding_gain; void init() { phase = .5; /* pi */ delay.init ((int) (.040 * fs)); left.fractal.init (.001, frandom()); right.fractal.init (.001, frandom()); } void activate() { time = 0; width = 0; delay.reset(); left.tap.reset(); right.tap.reset(); set_rate (*ports[3]); } void run (int n) { one_cycle<store_func> (n); } void run_adding (int n) { one_cycle<adding_func> (n); } }; #endif /* _CHORUS_H_ */
5,173
C++
.h
235
18.26383
79
0.616784
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,131
Eq.h
LMMS_lmms/plugins/LadspaEffect/caps/Eq.h
/* Eq.h Copyright 2004-5 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ equalizer circuit using recursive filtering. */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. */ #ifndef _EQ_H_ #define _EQ_H_ #include "dsp/util.h" #include "dsp/Eq.h" #include "dsp/BiQuad.h" #include "dsp/RBJ.h" class Eq : public Plugin { public: sample_t gain[10]; DSP::Eq<10> eq; int block; enum { BlockSize = 64 }; template <sample_func_t F> void one_cycle (int frames); public: static PortInfo port_info []; void init(); void activate(); void run (int n) { one_cycle<store_func> (n); } void run_adding (int n) { one_cycle<adding_func> (n); } }; class Eq2x2 : public Plugin { public: sample_t gain[10]; DSP::Eq<10> eq[2]; template <sample_func_t F> void one_cycle (int frames); public: static PortInfo port_info []; void init(); void activate(); void run (int n) { one_cycle<store_func> (n); } void run_adding (int n) { one_cycle<adding_func> (n); } }; #endif /* _EQ_H_ */
1,763
C++
.h
71
21.985915
66
0.708534
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,132
Scape.h
LMMS_lmms/plugins/LadspaEffect/caps/Scape.h
/* Scape.h Copyright 2004-5 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. */ #ifndef _SCAPE_H_ #define _SCAPE_H_ #include "dsp/Sine.h" #include "dsp/Roessler.h" #include "dsp/Lorenz.h" #include "dsp/Delay.h" #include "dsp/OnePole.h" #include "dsp/BiQuad.h" #include "dsp/RBJ.h" #include "dsp/SVF.h" typedef DSP::SVF<1> SVF; class Scape : public Plugin { public: sample_t time, fb; double period; DSP::Lorenz lfo[2]; DSP::Delay delay; SVF svf[4]; DSP::OnePoleHP hipass[4]; template <sample_func_t> void one_cycle (int frames); public: static PortInfo port_info []; void init() { delay.init ((int) (2.01 * fs)); /* two seconds = 30 bpm + */ for (int i = 0; i < 2; ++i) lfo[i].init(), lfo[i].set_rate (.00000001 * fs); } void activate(); void run (int n) { one_cycle<store_func> (n); } void run_adding (int n) { one_cycle<adding_func> (n); } }; #endif /* _SCAPE_H_ */
1,707
C++
.h
62
24.758065
66
0.703019
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,133
ToneStack.h
LMMS_lmms/plugins/LadspaEffect/caps/ToneStack.h
/* ToneStack.h Copyright 2006-7 David Yeh <dtyeh@ccrma.stanford.edu> Tim Goetze <tim@quitte.de> (cosmetics) Tone Stack emulation. */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. */ #ifndef _TONESTACK_H_ #define _TONESTACK_H_ #include "dsp/util.h" #include "dsp/windows.h" #include "dsp/ToneStack.h" class ToneStack : public Plugin { private: DSP::ToneStack tonestack; template <sample_func_t F> void one_cycle (int frames); public: static PortInfo port_info []; void init() { tonestack.init (fs); } void activate(); void run (int n) { one_cycle<store_func> (n); } void run_adding (int n) { one_cycle<adding_func> (n); } }; /* /////////////////////////////////////////////////////////////////////// */ class ToneStackLT : public Plugin { private: DSP::ToneStackLT tonestack; template <sample_func_t F> void one_cycle (int frames); public: static PortInfo port_info []; void init() { tonestack.init (fs); } void activate() { tonestack.activate (ports + 1); } void run (int n) { one_cycle<store_func> (n); } void run_adding (int n) { one_cycle<adding_func> (n); } }; #endif /* _TONESTACK_H_ */
1,925
C++
.h
75
22.626667
77
0.684789
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
true
true
false
false
false
false
false
false
20,134
Compress.h
LMMS_lmms/plugins/LadspaEffect/caps/Compress.h
/* Compress.h Copyright 2004-5 Tim Goetze <tim@quitte.de>, Steve Harris http://quitte.de/dsp/ mono compressor. */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. */ #ifndef _COMPRESS_H_ #define _COMPRESS_H_ #include "dsp/RMS.h" #include "dsp/util.h" class Compress : public Plugin { public: double fs; sample_t f; DSP::RMS rms; sample_t sum, amp, env, gain, gain_t; int count; template <sample_func_t F> void one_cycle (int frames); public: static PortInfo port_info []; void init() {} void activate() { rms.reset(); sum = 0; count = 0; amp = 0; env = 0; gain = 0; gain_t = 0; } void run (int n) { one_cycle<store_func> (n); } void run_adding (int n) { one_cycle<adding_func> (n); } }; #endif /* _COMPRESS_H_ */
1,516
C++
.h
58
22.965517
66
0.706294
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,135
Pan.h
LMMS_lmms/plugins/LadspaEffect/caps/Pan.h
/* Pan.h Copyright 2004-11 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ panorama with width control, stereo image width reduction */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. */ #ifndef _PAN_H_ #define _PAN_H_ #include "dsp/Delay.h" #include "dsp/OnePole.h" class PanTap { public: int t; DSP::OnePoleLP damper; sample_t get (DSP::Delay & delay) { return damper.process (delay[t]); } void reset (double c) { damper.set_f (c); damper.reset(); } }; class Pan : public Plugin { public: sample_t pan; sample_t gain_l, gain_r; DSP::Delay delay; PanTap tap; template <sample_func_t F> void one_cycle (int frames); inline void set_pan (sample_t); public: static PortInfo port_info []; void init(); void activate(); void run (int n) { one_cycle<store_func> (n); } void run_adding (int n) { one_cycle<adding_func> (n); } }; /* stereo width reduction */ class Narrower : public Plugin { public: sample_t strength; template <sample_func_t F> void one_cycle (int frames); public: static PortInfo port_info []; void init(); void activate(); void run (int n) { one_cycle<store_func> (n); } void run_adding (int n) { one_cycle<adding_func> (n); } }; #endif /* _PAN_H_ */
2,014
C++
.h
86
20.430233
66
0.705913
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,136
elev0.h
LMMS_lmms/plugins/LadspaEffect/caps/elev0.h
#ifndef _ELEV_0_H_ #define _ELEV_0_H_ static struct { struct {double a[31], b[31];} left, right; } elev0 [] = { { /* 0 deg */ { /* left */ { /* a */ 0.00016115992608954982025, -0.00010768917854458648288, -0.00063346856180946037665, 0.00046347742029473120925, -0.0015439852840736303929, 0.002322097197441415177, -0.0030171705384801628114, 0.0040049622633845857744, -0.0061951205789184497774, 0.007477237413920645448, -0.0077387794749934207816, 0.011064070674173843989, -0.0039638879209113325741, 0.18900346994412650647, 0.11180546019300675875, -0.30157903765100790849, 0.1347944936894422685, -0.11208456287521188777, -0.10407312479763883295, 0.36646565042846751536, -0.03021948747062653054, 0.12118534476775748299, 0.38955804570991658942, 0.10541328915312503378, -0.3230797648386828369, -0.047446774889543630316, 0.074881148756352045037, -0.35284433955617594547, -0.17940547664191497379, -0.031687898661414630463, -0.079669760381518725523}, { /* b */ 0, 0.060872553612196914075, 0.028134109258271672305, 0.19714624090581839289, 0.080867126093135940912, 0.015075818698181541605, 0.09631379420052403606, 0.10062956273363155013, 0.078554087002350780899, -0.015526584402269706653, -0.046159578846992205259, 0.08942137063482573367, -0.0031327716162594778163, 0.044707285945433258845, 0.019012234566775400302, 0.023245822417901004786, 0.099133288024720767062, -0.016901102476781122708, -0.0080432755625650560749, -0.059588888105196691214, 0.025493274350173785597, 0.052825597092033604874, 0.052130256044543292482, 0.014949928868884798661, -0.015431476841200410938, -0.0083606347897418296922, 0.019454219693235737937, 0.0028516212312724819981, -0.044967056642177052894, -0.03421366827611452277, -0.063356553650132305111}, }, { /* right */ { /* a */ 0.00016115992608954982025, -0.00010768917854458648288, -0.00063346856180946037665, 0.00046347742029473120925, -0.0015439852840736303929, 0.002322097197441415177, -0.0030171705384801628114, 0.0040049622633845857744, -0.0061951205789184497774, 0.007477237413920645448, -0.0077387794749934207816, 0.011064070674173843989, -0.0039638879209113325741, 0.18900346994412650647, 0.11180546019300675875, -0.30157903765100790849, 0.1347944936894422685, -0.11208456287521188777, -0.10407312479763883295, 0.36646565042846751536, -0.03021948747062653054, 0.12118534476775748299, 0.38955804570991658942, 0.10541328915312503378, -0.3230797648386828369, -0.047446774889543630316, 0.074881148756352045037, -0.35284433955617594547, -0.17940547664191497379, -0.031687898661414630463, -0.079669760381518725523}, { /* b */ 0, 0.060872553612196914075, 0.028134109258271672305, 0.19714624090581839289, 0.080867126093135940912, 0.015075818698181541605, 0.09631379420052403606, 0.10062956273363155013, 0.078554087002350780899, -0.015526584402269706653, -0.046159578846992205259, 0.08942137063482573367, -0.0031327716162594778163, 0.044707285945433258845, 0.019012234566775400302, 0.023245822417901004786, 0.099133288024720767062, -0.016901102476781122708, -0.0080432755625650560749, -0.059588888105196691214, 0.025493274350173785597, 0.052825597092033604874, 0.052130256044543292482, 0.014949928868884798661, -0.015431476841200410938, -0.0083606347897418296922, 0.019454219693235737937, 0.0028516212312724819981, -0.044967056642177052894, -0.03421366827611452277, -0.063356553650132305111}, }, }, { /* 5 deg */ { /* left */ { /* a */ -0.00017696253206769471666, 0.00021107918665545769466, -2.0620763396513567709e-05, -0.00018186803582760145237, 8.373679531671252463e-05, -0.0011082651235009427504, 0.0013814999459888562677, -0.0022305356427783796375, 0.0034326663959655806524, -0.0048009305045435424902, 0.0056349419483249160723, -0.0071918462710358118523, 0.0095052705275961314052, 0.0007448483104648476183, 0.17757056636691290197, 0.080751512987945209265, -0.25584565078920767922, 0.11313029183314063375, -0.11130775557262871656, -0.068744404280904225502, 0.30732662377751773786, -0.027707718907452515145, 0.12364106832536264635, 0.35026569867066370545, 0.07471421608637314471, -0.25776067100019012246, -0.055371338162804373262, -0.012256460040568777775, -0.25866536683473279057, -0.17782894990620184972, -0.064670654485651041243}, { /* b */ 0, 0.055090796937088862273, 0.055437560430932439348, 0.22990052867708210549, 0.099428824021023237689, -0.0027769955961815754458, 0.10085574251165992099, 0.16312061234767347151, 0.039470376556444738969, -0.041848049583603372237, -0.032542858026161185225, 0.02139343730159100343, 0.048098231701239960167, 0.037733893377851102091, 0.019373785721910955632, 0.061746578342221650204, 0.035488211745084013993, -0.01806919754088130714, -0.027128260233510496924, -0.042503705793375312627, 0.051926493757134692397, 0.07069393657400141473, 0.019673226352204746525, -0.00012103498389409196589, -0.027627741515316259213, 0.009635983304503818736, 0.018631749546224596337, -0.016615904545286074023, -0.044341341793715960407, -0.030215378264473007064, -0.041358753534985123745}, }, { /* right */ { /* a */ 0.00021674611259610464188, -0.0010589548271123022313, 0.0010969447757948318917, -0.0021209537250143142839, 0.0028729385414139746446, -0.0035972033027254976534, 0.0044402795492401794797, -0.006073245440653581885, 0.0067101547727077218847, -0.0060717874211108089147, 0.0086287155143119700917, -0.0062948148262572563294, 0.16059210095363563031, 0.20386616350646591389, -0.35114984389089032302, 0.086216963151213521499, -0.024061119790435951671, -0.22331071743275801578, 0.43099142324044042995, 0.031472736270457199459, 0.027458263182878438202, 0.45513707401194097857, 0.15478327645377623623, -0.42059874974912558887, -0.063648009970495300625, 0.14751824494855145242, -0.3619823099623888929, -0.19283311769574695838, -0.011882636463899330648, -0.089521111340056691574, -0.026022800212665765651}, { /* b */ 0, 0.079572218898552926625, 0.053165668189737030902, 0.17176014787903778891, 0.086820173277007889334, 0.060694063956346300248, 0.029633229388448603658, 0.084867011888823756793, 0.042640077616905060209, -0.029035195885816392214, 0.029653473189723660031, 0.085308978346717134755, 0.0048636815673216080014, 0.01605369931437055156, -0.015454426947098148445, 0.042357713858054937828, 0.097316348725284551602, 0.0052640081186572720839, -0.0050867430431700277893, -0.058963722940593224497, 0.01239314631939524014, 0.049900557159985092781, 0.043026255599535281893, 0.035562415292306887027, -0.020192113930755928308, 0.00095028634658748944997, 0.027622002386662635603, 0.0053820468586939663319, -0.050497180968884017305, -0.041024391020222893134, -0.067588730417863646105}, }, }, { /* 10 deg */ { /* left */ { /* a */ -7.1010261369361740713e-05, -2.5406000913078783136e-05, 0.00026759211721569383866, -8.4826521543719497699e-05, -6.8403155187606121818e-05, 9.9131511745002002427e-05, -0.001071700570934656406, 0.001098798497419818665, -0.0016933689074365935318, 0.0027481963651477848976, -0.0036606743705400422717, 0.0042060653153788429837, -0.0062821160138389776223, 0.0076862441225774222331, 0.0058233041551466677155, 0.16799390464336699802, 0.041851271057766162298, -0.22290193556303047884, 0.10546865511928886494, -0.106571152734197927, -0.05232811055746418305, 0.26763450404808436511, -0.00068426453713908361176, 0.10572562194246151734, 0.30292254127254580887, 0.047280029708680913758, -0.26546206167345709481, -0.050352179118358361687, -0.0083467693297659146384, -0.25140273187294914781, -0.13705105321611377178}, { /* b */ 0, 0.085263325112734211775, 0.12395856358757566251, 0.21451203553535497237, 0.11368862237752869193, 0.045975440610246019746, 0.083841885720174272323, 0.10819905319188556636, 0.017486735496958213942, -0.05191158900020079181, -0.028267552250675329062, 0.051676694820251889428, 0.024780584746461171985, 0.045146936514918814543, 0.035293885693133908443, 0.023177674056059194285, 0.026807353374273618085, -0.049021533124109263613, 0.0011432617002724524552, -0.014547714109382908765, 0.058036283161763971283, 0.045635673184493387444, -0.0059891149151256751343, -0.0012376581991289520301, -0.019638054713496739395, 0.011740972931786674421, 0.0070604429584699562872, -0.017821868007230894093, -0.043622648597657895375, -0.015285888173058835571, -0.030656316135630173186}, }, { /* right */ { /* a */ -0.0011216376818203241394, 0.0014367662570877876016, -0.0025198357459085482524, 0.0025096953781399834564, -0.0032299692564715168364, 0.0035089721995293712831, -0.0040294036972093535964, 0.0036878989368056844592, -0.0019541662377772078818, 0.0022472517084747394012, -0.0005003840012913342121, 0.11928409575778700646, 0.29902193960400280659, -0.33871176061436253368, -0.029905872073465733507, 0.049693450022043894609, -0.28970435882155598506, 0.45366820402683577518, 0.09535253759394757278, 0.0024675934431721262968, 0.49110597895532337454, 0.19050822857905158614, -0.41285791290153855959, -0.18341018858515711898, 0.13888828001019423719, -0.2208057176764740559, -0.23909434820313357761, -0.060380123254846998493, -0.033071856447566480575, -0.071881204823059763331, -0.036764849742506287844}, { /* b */ 0, 0.048428266517714681216, 0.029860695413591771541, 0.23466227365818198569, 0.085941189405338319629, 0.044706680082991917535, 0.020668341355824411398, 0.080504621225128858431, -0.053243345596708929746, 0.014347828952276237002, 0.057257699183194593617, 0.10270797432433603769, 0.075890406819505484837, -0.061027205690788143, -0.022290009665058146959, 0.026499148640187108333, 0.08706458016097509689, 0.047083089686696284748, 0.019236465222853896262, -0.071824516859942622027, 0.016260258014978885843, 0.013562271183576411759, 0.05466513346106918747, 0.041512450833693780028, -0.0083719999989691172571, 0.021910246791019868939, 0.021244709892120912376, -0.0015736893779544000593, -0.057791902480916139406, -0.053290959980646299132, -0.056723042022796543726}, }, }, { /* 15 deg */ { /* left */ { /* a */ -2.3034189992013315946e-05, 0.00024731908682368210911, -0.00021574284523261577293, 0.00051389676229479305802, -0.00040052734994627293714, 0.00015362020114751537476, -9.7371630267258237708e-05, -0.00037603622009404547629, 0.0002572275934744837041, -0.0015722688641566645584, 0.0018871578089975343112, -0.0026390305604912303594, 0.0044552306132121174964, -0.0051638664595472089092, 0.0058601946919547252823, 0.0062588950906924088746, 0.15092144486019995475, 0.0099448016942541832969, -0.18453753620347421172, 0.1114543447477359811, -0.14402726113297464883, -0.024507724738784635726, 0.25757743305304819925, -0.013476042841332157296, 0.11613418986197675264, 0.25394558785192672401, -0.016719111244215333761, -0.27302452491092155107, -0.018530595274781173909, -0.055725585873423050254, -0.21319498722583413164}, { /* b */ 0, 0.22058127507023964076, 0.066638548713839174109, 0.24589498965493170046, 0.22418170335686704586, 0.066699912495684771097, 0.017692407245350268152, -0.0085239509346052289018, 0.020142743144099965746, -0.12941267987335691725, 0.051998998636554896735, 0.073490792657822143208, 0.023168188775066381885, 0.11108377267495579688, -0.084872666928730286506, -0.0042479536929002342099, -0.0070616745589371816838, 0.019184876108773011444, 0.054142940329746425121, -0.0041972999708067126184, -0.017760334508399627101, 0.00029087332720613727141, 0.0015107269032326241069, 0.045117303832109524608, 0.00061607549538982876725, -0.01586494033253469868, -0.017623046137960902968, -0.015727943013500934183, -0.027390319948145405715, 0.011098882581240697084, -0.037335305543559987873}, }, { /* right */ { /* a */ 0.0013800413829036378699, -0.0015945865447638749024, 0.001441061774076768387, -0.0018400002827411929274, 0.00081415159166025458104, -3.6541798449987185869e-06, -0.0023947168327270382249, 0.0060372912386117555394, -0.0079721892125425228293, 0.011425654544714239358, 0.061862177923783547018, 0.36620909077115043617, -0.25889177344254588053, -0.18653313956236422522, 0.16218219769577690847, -0.37467524215994219006, 0.40581752873141435645, 0.22834841562013005745, -0.06840666565317407577, 0.49400293320883370551, 0.27528320440222048271, -0.3919047384840718129, -0.31990047663825482704, 0.21386477926686497941, -0.20486652355001294668, -0.31035711367531787497, 0.023166421866086150255, -0.085451721164105515216, -0.12985289364082702734, -0.017432175610271501143, 0.035672848704699881839}, { /* b */ 0, 0.073725628815923066606, 0.015390993798134605663, 0.2124990748692205389, 0.10259839572077958381, 0.065254899181072217873, 0.030885702765035875916, 0.0059236228567302942616, -0.015551106356376763473, 0.045129370224812268009, 0.040489463356448152087, 0.1405222487957555888, 0.021308824891246722771, -0.052224936798331650367, -0.03569736412508371648, -0.0011315094965852479092, 0.10462683156774776894, 0.0707489055921939336, 0.035186628731939326165, -0.082713931987719563343, -0.013492902896563435666, 0.0074634101167011038247, 0.063222517807061034967, 0.061186927189146173012, 0.011493852096039973432, 0.0030603490119027530574, 0.011353160845064234896, -0.0052093273690718977509, -0.056452439121564002011, -0.044554455604682921543, -0.065044801859899914476}, }, }, { /* 20 deg */ { /* left */ { /* a */ -1.280464119543479537e-05, 5.0847061283666207532e-05, -0.00010881943401930269165, -9.3295295100479555105e-06, 0.00018214684718853571478, -0.00016714467226952578471, 3.8897084095323997133e-05, -8.6690768452699420998e-06, -0.00023930660994486751061, 0.00071371038218304150291, -0.0010748950257655209839, 0.0014994882018698474369, -0.0025345205104804202634, 0.0029200474736118531283, -0.0032896042424790383762, 0.0051489509612229200641, 0.008226002461003689703, 0.13635910042254784091, 0.040811705554130717211, -0.12913078637682984251, 0.08933326884147385627, -0.073730698277943429453, 0.014957473944005039712, 0.2228220708940659156, 0.013110312729186501812, 0.1325955850479260123, 0.27241754762964698333, 0.1078490562880785042, -0.050076992741537873499, 0.062667886178355280968, 0.091717117197270825457}, { /* b */ 0, -0.025158955952384043364, -0.062687203468275720653, 0.10856821347889067386, -0.031139900499438377679, -0.26394215694752753976, -0.20012513910774853976, 0.014278312291601813477, -0.074773034303560192981, -0.077797089910458527839, -0.077518931664924406455, -0.048200302791706617356, 0.013312597278228310849, -0.060823018845704290847, -0.12047847469359718175, -0.080758707132477791646, 0.014496285603640690631, 0.024176297966430060349, 0.030498046991178640042, -0.097021462282728676563, -0.072063053678794730672, -0.030360872356541279693, 0.036410577287371292954, 0.060757926768420511543, 0.0026579726669639916134, -0.046553056477285914561, -0.024262156919224731055, -0.01133193016360223293, 0.0053419247464381305543, 0.017221495934721664511, -0.017836842867227642451}, }, { /* right */ { /* a */ -0.00036599626872854673643, -0.0002460058195520581489, 0.001771055531804219263, -0.0025798946401336259049, 0.004338330896903190223, -0.0083341804897000444641, 0.012345621434499756686, -0.015540479481844504672, 0.021682746444567913002, 0.011508763580149114492, 0.37385080964059264064, -0.067135215764081365708, -0.36356326706210229105, 0.18127847719926099002, -0.35357578125112620882, 0.24597069823393058474, 0.39826579050225030532, -0.061438050383000319954, 0.42367882073686397026, 0.37232726266096677348, -0.31491476121032047075, -0.45397206381806498587, 0.22065950816309298776, -0.17315503013207861338, -0.33798287901752616103, 0.015306755417106993056, -0.14347429792658547565, -0.12428129176521134081, -0.06877797614801214876, 0.078433037183928827618, 0.054698817074467706578}, { /* b */ 0, 0.048889005590125461653, -0.016041040104873907635, 0.24226714422677714245, 0.13214897408713416338, 0.11581965776929874223, -0.026343158066582245125, -0.043469803567581372095, 0.050182432390893233487, 0.059005150016260693446, 0.11712934066232007224, 0.10913298414466296449, -0.052970566889378595254, -0.041796521766095801054, -0.085321521280405307475, 0.051627174717985155339, 0.10872628148092013112, 0.07994668585422151641, 0.016498059996527050797, -0.087325778447147950345, -0.034046925974987041208, 0.036057834351442899501, 0.047799563959215543574, 0.099378425802562272984, -0.0093373522400217665029, 0.0010294654363175760603, -0.0028328873103410090462, -0.0010957144530761298018, -0.04991883841052625892, -0.057430845556592433065, -0.065998025744829283412}, }, }, { /* 25 deg */ { /* left */ { /* a */ 5.4851695726303682787e-05, -6.9900108687348527781e-05, 0.00020257180634308816149, -6.0375831348324806962e-05, 4.7622701199179218179e-05, 4.3511237113325919312e-05, -1.8460715942027545235e-05, 8.4488357907084823311e-05, 0.00036921527953037713843, -0.00026485096144002531759, 0.00055643892715728825518, -0.0012241930933548604565, 0.0014098272716617245813, -0.0018170794729988060112, 0.0030765460808102034623, -0.002557592370458494635, 0.0040626938255239365694, 0.0062155450463591277455, 0.11813763723118875237, 0.036915229743791910799, -0.10863854615301982154, 0.071427932468587362891, -0.090269999915917886746, 0.0041725637770634281531, 0.20269035461810414045, 0.014055537838481013679, 0.12304199409125804454, 0.24661633430483886897, 0.050829375524627518068, -0.058588412423787872285, 0.026858601453252917146}, { /* b */ 0, 0.030312183511849170175, -0.095541000844981405216, 0.1892261747966222929, 0.12808694865439063104, -0.1294162586626401712, -0.23340276657783654013, 0.070083589599131967951, -0.16393473066693420304, -0.038721197898189396724, -0.0071446294807459009846, -0.078586084721193882885, 0.1042302939213007873, -0.057276855840310281209, -0.10131559666906597705, -0.068958661479864846733, 0.0053298328402118233527, 0.034128981517000944734, 0.084083984187854898806, -0.1060379653611276396, -0.056291907571809352007, -0.035088677719993799364, 0.033487980128643624056, 0.083839894129689174207, 0.0064468873873374521466, -0.040191723771829113154, -0.021859064198159749992, -0.0074521605177013672261, 0.0068960510733739877054, 0.020068191506558696879, -0.032594931639526314449}, }, { /* right */ { /* a */ -0.0021078233190400252894, 0.0033911920282320151543, -0.0050816297403333265947, 0.0070429241880685944377, -0.010690185705680699257, 0.013587756297721298449, -0.015591114736097921867, 0.020843633502798386559, -0.012948727955118533028, 0.29853930777651016548, 0.16678964803161847041, -0.46891720194919617182, 0.10671347466639086177, -0.19485400919129133857, 0.020296222080044834524, 0.50175032885310333342, -0.062426652745247585008, 0.35287342243971148159, 0.46181252928104832289, -0.21215736966683634845, -0.39772241165672927998, 0.11779767228724952188, -0.11684806370437089695, -0.34157516678375399177, -0.12471035998072588225, -0.083290919299407184528, -0.03285571473570295109, -0.18135912101915549477, 0.17043289762173896573, 0.094838956789539824443, -0.1597664824630647129}, { /* b */ 0, 0.073618220206590062604, -0.0022034661454478632336, 0.18948155049250750559, 0.10488342872512837478, 0.1018566136577053749, -0.031429803589201610325, -0.036141501734993780603, 0.06141191135917295485, 0.13766930493647536182, 0.064430777704134467587, -0.04979451200932960564, 0.025701316421090220077, -0.059124346167005459307, -0.02257216690736835174, 0.16212608510750292634, 0.036696102518347234467, 0.055920596136981026714, -0.041643049307846922991, -0.096430747652202081222, 0.041209812920335597841, 0.037813250066461717713, 0.098343702773055763355, 0.048742335630406335989, -0.045791237814445107102, 0.023916124844060998589, 0.0008038992096136357568, 0.019401014685008904914, -0.063873397769254047773, -0.070877111835333100887, -0.048087413353891522716}, }, }, { /* 30 deg */ { /* left */ { /* a */ -5.5564638593561861978e-06, 9.3852107960201930706e-05, -3.1084894380750682785e-06, 0.00028840725196932481822, 6.4946293412693228324e-05, 0.000155365044510191757, 5.7003061507132635199e-05, 2.4933508036006904319e-06, -0.00013672519873220156938, 0.00028540432156498596328, -0.0003096984341893760373, 0.00059548038278123185257, -0.00076294144120414401911, 0.0011346642860010636156, -0.0015290288656044648263, 0.0025263433554162384453, -0.0018363250559039192775, 0.003292358995918287512, 0.0044893145683538842466, 0.099393432492281275081, 0.044378238408873671439, -0.099042449494685103062, 0.046096231459888392656, -0.069686141489361252965, -0.0044478077054072029384, 0.18077959408453747603, 0.026777358766022496539, 0.09446026603660007126, 0.20126013716523227792, 0.055686081012890069342, -0.061474581435280728492}, { /* b */ 0, 0.025180167786686968867, -0.040991063065334842896, 0.26971809175449501517, 0.19181840837760588681, -0.15250762307253418193, -0.24123727501546010643, 0.037160259659663186227, -0.11575978546930765223, -0.0019633931924722958229, -0.0063613286760411114074, -0.080834549709765668446, 0.10457219077671109364, -0.041267150275581254704, -0.073405901137024720526, -0.038209215752968428426, -0.008657436421921627101, 0.04235425265723680166, 0.058400869357641549406, -0.092083706177692459249, -0.024897575410173788946, -0.015314459922213807808, 0.025318966408588439165, 0.066904667133937945067, -0.017951122045153925649, -0.019282834278142035878, 0.012661929285409656565, -0.0046187674564157621404, -0.00082718411884008524737, -0.012980776141549577041, -0.049460302773279840594}, }, { /* right */ { /* a */ 0.0033885300294439271718, -0.0048613774544705584679, 0.005302865794605711447, -0.0070892003638982695191, 0.0070361738768297960034, -0.0063941087232333854162, 0.0081928188122495221313, -0.0089060004377240070683, 0.17020867472563366851, 0.35789768856113390871, -0.39521414506180546633, -0.12407235017989748371, -0.0089740119029986867294, -0.14021003585508545752, 0.50678090343772674853, 0.01377337314436687804, 0.17528644143745444883, 0.56933646082806399491, -0.072240746769574454289, -0.35931102012550142355, 0.013416561081202801886, -0.033982538129653794279, -0.36652241223536613512, -0.19744384675815446206, -0.091076149317218135781, -0.10323197357604668722, -0.054589396278610473334, 0.14291346832079576679, 0.044643159462969331241, -0.11546406559509028722, -0.012902913224164223871}, { /* b */ 0, 0.10605423311031529632, 0.014864888313219706828, 0.15043223924465926045, 0.11450889378892231685, 0.041507161879618739708, -0.03674693254257770797, 0.040977443315154751802, 0.10157898434947321142, 0.15279684507974583552, -0.061822560485326125135, 0.004772237741598212013, -0.016819258489976333937, -0.066786210621604474857, 0.1081005394898459232, 0.093086116443072242088, 0.048463595010632236348, -0.0058250974846723452272, -0.081800519183662989686, -0.032885530861031207761, 0.052918311400137335587, 0.073362721889048077006, 0.065072441811087039509, 0.0058499565193945515795, -0.029018687889527036705, 0.034235417789990618687, 0.014857609548302522229, -0.011971843220984736827, -0.076724286436182287385, -0.040299204163377760901, -0.048631300045695255441}, }, }, { /* 35 deg */ { /* left */ { /* a */ 2.2246319549504983693e-05, -1.7981306166259231711e-05, 0.00013168464332857961196, 9.9034379204276934416e-05, 0.0003615243665544558456, 0.00041192910880949624997, 0.00055513530303891254342, 0.0004627765871206843476, 0.00030127446919159267145, -8.1061927205416939302e-05, 0.00023778236973165040101, -0.00033298576951335152885, 0.00084825840306751616737, -0.00069129572830007104955, 0.001420559255088660322, -0.0012973704223082083153, 0.0019848520281529093146, -0.0013496792289693941222, 0.0019496759876003223744, 0.0035721438084931889101, 0.079964526305924266136, 0.060786211180906268847, -0.072227985409185901933, 0.033541081923930959885, -0.047731446357855700224, -0.020688550877619171775, 0.15226630594781381811, 0.031397312903122531758, 0.092806103290377084392, 0.19568936619800136878, 0.096992123180227041157}, { /* b */ 0, -0.056091597445684371337, -0.12532019980467795639, 0.21619816714720657691, 0.24292246036838882617, -0.18441540976129461304, -0.16877038135500177507, 0.046285230921004616444, -0.12996636591072752154, 0.0011975693127094788615, -0.086536047550177241927, -0.082626417097879378826, 0.12612621449737543289, -0.0067070476921643473744, -0.031313081347780769015, -0.054627413082521114607, -0.050072452026928004898, 0.043095265048753716997, 0.061391567137795977072, -0.031588886056574394523, -0.015918232628454875854, -0.039366355925538054628, -0.015517509680679220097, 0.059049611165241933097, 0.0093687542665824019572, 0.030141503283322157447, 0.0095184589911020967001, -0.023527488786957706512, -0.040401343824290891771, -0.038667213391636867659, -0.059674745198669276736}, }, { /* right */ { /* a */ -0.0013714152522657646616, 0.0006273793896546808746, 0.00043122457778210776524, -0.0021922389323563579167, 0.0055708395088355927571, -0.0075242460363320051719, 0.010591462743974114358, 0.048398020978598910169, 0.41619284829983088647, -0.14382476555407414098, -0.35882374610701062156, 0.039668989509555538375, -0.1620882671571429734, 0.38019200426458643616, 0.14583130894703361102, 0.06383703585639832756, 0.5445344840782336826, 0.12599765399910417552, -0.28518956246040627622, -0.11700115479775820282, 0.0039966079479203386882, -0.38531175783483723185, -0.22423262908750918321, -0.10515959452829688747, -0.1399597004266011635, 0.043707663783861684659, 0.04139732538284597585, 0.015522465146040196476, -0.052820550344454333946, 0.0032102282042194285605, 0.015984710792678324953}, { /* b */ 0, 0.13427337041599388123, 0.0048139154348175727804, 0.1572444113827342338, 0.10908352866460453712, 0.025770956456642665766, -0.0050018096122567134998, 0.055807560734215735931, 0.21187737349172824919, 0.011038836686726512248, -0.080848400150794128005, 0.042421610143179855346, -0.075470694051683537285, 0.066863221023921726172, 0.13083208495369075264, 0.033121454529102395403, -0.050277280289135257985, -0.039128620222435295251, -0.012052262736315584243, 0.010345718716008728277, 0.087596569448757793941, 0.022997773874034593833, -0.025031434367365004712, 0.052202915093862989337, -0.0089830303802527350365, 0.068664492264150847611, -0.028446270625478303762, -0.049388113445691245174, -0.0848237667824044278, -0.0093243400765309625289, -0.022253412473574249453}, }, }, { /* 40 deg */ { /* left */ { /* a */ 2.1793835894011746233e-06, -0.00027154751197633331117, 0.0005671281328931141244, 9.0822337706075701542e-05, 0.00099206136663226862638, 0.00073251131878920849871, 0.00067401960485158330088, 0.0010339520481461583756, 0.001261491156673288927, 0.00081585154267788454179, 0.0013721862622898001877, 0.00056652749939184432991, 0.00017514670911517038476, 0.0018149465347977447247, -0.0009629098705887795262, 0.0021172863388929652473, -0.0012859543649379467922, 0.0012650418609871942523, -0.00080761000567641804977, 0.002045207774387101593, 0.00012780165967174808572, 0.059086023985258084856, 0.044267535707145921897, -0.085465943991669401925, 0.052769026021581844077, -0.039779355975461117012, -0.042237528407387814333, 0.1643077306221277234, -0.02446083998811077187, 0.061938320602659968639, 0.16384587098797892546}, { /* b */ 0, 0.33422749822261538233, -0.11487095431066823847, 0.16644427691021174143, 0.38071775606933477842, -0.39012462081940146863, -0.053576722369511053934, 0.068011811522050713563, -0.22451887863150776781, 0.19746958958965360464, -0.065277732785341824329, -0.017461553695752307647, 0.089348993440457880055, -0.075603194818196772786, -0.019483190216752765966, 0.046489056814216778157, 0.014291576027163077622, 0.030426427107856091059, 0.019112163865651898842, -0.091943596894211720993, 0.00084339433090163673512, 0.025779716876124514346, 0.02709668019695160579, 0.04270873769130628661, -0.04509487662892469606, -0.037299422899345069382, 0.0029375173199799875512, -0.0014709831565318243207, -0.033163954348824908891, -0.029644025426878162222, -0.082647976311391035953}, }, { /* right */ { /* a */ -0.0039789246353439718801, 0.006133535092132241795, -0.009010367649220363262, 0.012938576527919687376, -0.01631979618553144884, 0.02221570561540889277, -0.017115080265671555465, 0.32623476405816531631, 0.17063411234871997402, -0.45850444292681674652, -0.044599086886291765264, -0.072363693609748216962, 0.1893440694816350689, 0.21226201381446715977, -0.0040666736535709159528, 0.54388239423168593945, 0.29842581082375013724, -0.23242339948278389894, -0.14737358160892799486, 0.032063708780309327362, -0.34195980604076975373, -0.26555148095350827875, -0.14613400600363329884, -0.18983946477948737686, 0.074588566864848854232, -0.024440181328726912069, -0.019429265748025642546, -0.0080576389074145035596, 0.074790705429606918475, 0.019974100701055860774, -0.067154806391257426679}, { /* b */ 0, 0.16460431381272111473, 0.0027972040284951842602, 0.10698578598074351409, 0.04041523264294942519, 0.087410249710898862974, 0.028702626391889109886, 0.10146221100793439973, 0.18156553983888379378, -0.071713879295784793699, -0.039211217036441703421, 0.030793778252199113105, -0.01910649119353687031, 0.053438277835419004114, 0.12370544227754264044, 0.0047416582382763319825, -0.10684133284608565706, 0.037659786684316430561, 0.0088382827167620553466, 0.043525054958149130002, 0.044306391668120712057, -0.049406157896095606596, 0.010671084977429030893, 0.067328644708557622289, 0.030307410623826858131, 0.044862049177331157768, -0.085971974419243063492, -0.028695458295538260607, -0.08142448996261655858, 0.026977203326033163955, -0.035164209142325708601}, }, }, { /* 45 deg */ { /* left */ { /* a */ 0.00016150711548268382404, -0.0019440537467503571367, 0.00060534014269947300762, 0.0029997960951551327913, 0.0017473438424821241544, -0.0034913008790417314649, -0.0013297336088485822714, 0.0029546740437647045496, 0.0017854343836894155488, -0.0023195419721240544825, 0.0038098928129871867387, 0.005714340667335032764, -0.0043362884876059493156, -0.0076623794658531325236, 0.0071344829064012849074, 0.0085652865194213445577, -0.0065424164318386712758, -0.0076128530448159315025, 0.011673780507467923506, 0.0042333848121640909462, -0.016075536998505498415, -0.00062319470183272093755, 0.067045896686504513617, 0.05542911650422560621, -0.11456365746859847876, -0.017773627792316837315, 0.043664478116614557912, -0.026494992388624571955, 0.071614826367208395119, 0.069981694853296638748, 0.05410009876933435935}, { /* b */ 0, 0.32113328027076204485, 0.29373423297325218506, 0.38933482938681784891, -0.090586007813944074973, -0.21987920577531960831, -0.057359431636112151454, -0.22344633226157803452, -0.12363438135674920115, 0.33827945463841063711, 0.23367396812070881373, -0.20292402709079504497, -0.13842849880823723807, 0.11751149999315868566, 0.081481066321800049712, -0.12070609368596690869, -0.037213914143678639146, 0.13644485314354831695, 0.031379917151685976506, -0.14910167035159932469, 0.037218743909137735892, 0.12517705391255906644, -0.059856545310699865725, -0.055103064822512731746, 0.00172123115449798747, 0.0095876042228992819361, -0.05475981256181788881, -0.045525117256077496375, 0.045296337271901604415, 0.042633212967158051754, -0.11473134600864867694}, }, { /* right */ { /* a */ 0.004417449235734144386, -0.00620600649388087372, 0.0063726741346805185207, -0.0066460159533262442438, 0.0072749496685510887939, -0.010562132644713340124, 0.1412531184820029484, 0.41189149595716445518, -0.29560082071015386651, -0.31284630781385347476, 0.013791284580906559842, 0.073780292975883843276, 0.27143177757182124221, -0.049788461825507793201, 0.43780067747246809162, 0.52900554641297115044, -0.18903325950267421685, -0.18045978026173392639, 0.053681675569795278546, -0.20352403802022145385, -0.27235779954244454526, -0.19356389785279901061, -0.28417610303460733023, 0.025695652746474118011, -0.026884398969355405296, -0.055587273835120548648, 0.07687468227252683417, 0.063709559864257719886, 0.046913219828460112071, -0.10119045335950105358, -0.073455519061875987341}, { /* b */ 0, 0.12523694267447316175, 0.030106660207185158284, 0.091163028595100129015, 0.010834765787190100972, 0.071592206550095252582, 0.058714390304081230665, 0.12465362164220200603, 0.090861745203670657434, -0.003444280655042625261, -0.03959819336804993456, 0.020380346085020425301, -0.01277437795050694741, 0.0098684267116778273676, 0.095808865982682456242, 0.010206453529616223153, -0.027353704550592272682, 0.051750464218872256617, 0.0434786225811953711, 0.015354926024562126283, -0.010280446025986642034, -0.043444088830705065996, 0.03676543185066136199, 0.077987256491148446158, 0.029809860226468615219, 0.0077312126460418045815, -0.082362130505542030523, -0.018751972524978961776, -0.052424431011004364589, 0.010904743472919462, -0.038141478777217741047}, }, }, { /* 50 deg */ { /* left */ { /* a */ -7.0597622706974894058e-05, -0.0014187129521170413829, -0.0041973382672311210229, -0.0058731709218912131476, -0.0051930623767848516081, -0.0029746939450570053509, 0.00074269907814061798465, 0.0068509220603474299191, 0.008540351205538199153, 0.0052652735571534492465, 0.0044591066482302394586, 0.011150738290360839855, 0.012062318974492836077, 0.0022383464427094819198, -0.005308597948033844105, -0.0029183510540098378527, -0.0091992071743485243768, -0.021803415056753649992, -0.017754068490916097289, -0.0019571380532878990266, -0.0032260693465929746182, -0.012139060934640566458, 0.0086345886406852256911, 0.066564554163928146835, 0.09702719796146619391, -0.034108301861165979396, -0.013453636385357681249, 0.051139938249747385335, -0.037622455357141926235, 0.037629351289369949995, 0.053611444630619065066}, { /* b */ 0, 0.13449444518795483638, 0.16598922760596712678, 0.28643099415512351946, 0.061039639002585799332, -0.14318519554738784461, 0.030355409185375825665, 0.018292234915534555384, -0.010792444827129044072, 0.29406308138177350564, 0.16978117316310270546, -0.19761376468752089863, -0.14479296715406986262, 0.028158686575310842848, -0.014840610429028844308, -0.13835806041959108903, -0.12487480125847327805, 0.060761864553032784997, 0.078122467536342887762, -0.071426222519668791655, 0.059574263595527081339, 0.1423682842825041428, 0.024943297676841003074, -0.0088567426092395207249, 0.047857365474066049238, 0.064262716563054378405, -0.0040174613885612941999, -0.10083010619624244164, -0.1174901659180965785, -0.035432070135468785033, -0.10903701903458573597}, }, { /* right */ { /* a */ 0.0035403829431335867572, -0.0063994790363381941906, 0.0094807609668512426992, -0.01338496440375386981, 0.017607435620764499973, -0.00054243706903381967363, 0.38819394139654789244, 0.11542622008901651243, -0.50122674108308362673, -0.063632383809830370125, 0.037142079636945900256, 0.21196427083662505719, 0.047035520659341988059, 0.19612761644393400529, 0.7247137348377837851, 8.1468708675903889205e-05, -0.25420295892867450505, 0.06339404868670878157, -0.12628198942908777647, -0.25323361607423072739, -0.22324934898687293083, -0.30038007421886431247, -0.061813695789816359982, -0.022059680251655836708, -0.1396998528962117847, 0.049196289436822214503, 0.069781770804478920889, 0.0099113580072232934648, -0.10035101637286514276, -0.022883120806838075367, 0.045852482443127853817}, { /* b */ 0, 0.10359200124467059234, 0.0052610111223993366592, 0.068536565964016221697, 0.036899271175761486075, 0.054564604864992288791, 0.099686898476871774188, 0.12172863702120204077, 0.041674938768762603836, 0.069604512032048732051, -0.059011297680986070369, 0.051313382834683098077, -0.023223897932292923707, 0.02582365530437620571, 0.13896725418573549482, -0.036231211028676588159, -0.015840360248773124874, 0.050522971645401183738, 0.033836980910442043813, -0.002528124984245084389, -0.0011833207609092404218, -0.028868936378292221756, 0.053324252075556168029, 0.04659001444153997723, 0.013013853236939522395, -0.043392750016090636533, -0.042388805764409162591, -0.016981208463182597551, -0.037989579387181005021, -0.004257499909570035268, -0.024568667484287445846}, }, }, { /* 55 deg */ { /* left */ { /* a */ 1.1578368860037852297e-05, -0.00011816999108404946384, 0.00087640537979605248609, -0.0020280251725873776891, -0.0021068047360156549885, 0.00027187084084001611473, 0.0031304327319237042031, 0.00089292948111940884104, 0.00045933324546720832871, 0.0051687820153134556023, 0.0065643674857646105991, -0.00055561873747722589911, -0.0032679994507733844955, 0.0015441048749342829293, -0.0029191626319674530803, -0.014514898701023515315, -0.012984473763688608727, -0.0046561391591620759911, -0.0083716584381443581719, -0.01356103312845358122, 0.0018988103912126463868, 0.020432107407306054903, 0.012447960186859341469, 0.013390889061007382743, 0.050401262412999581208, 0.1024391092795812197, 0.0076396060180033975584, -0.011690786411236442355, 0.05990382429044149859, -0.036577009552216099841, -0.021380778457980031959}, { /* b */ 0, 0.10623619191692246222, -0.0067788270131929895257, 0.18852906559209403614, -0.049206343541163821698, -0.01126637043082079348, 0.24317483738434120255, 0.096263757482575873503, 0.05760214667596685878, 0.33866109073667216567, 0.2547586839746901477, -0.059317376256765030895, -0.013459832727269471775, 0.075663009614992948748, -0.035307654850449954331, -0.1798777472163115565, -0.15813077589243995646, -0.049518167965986736867, -0.14129805415867557894, -0.2164595138297309429, -0.022427379978498529489, 0.031400080641869054787, -0.061226279240850223218, 0.010520714239237172194, 0.1198982523673702838, 0.092899746554145345989, 0.025864164006697554221, 0.010682328837122168075, 0.035779475401134797075, 0.023278286305425388569, -0.11316441404674026927}, }, { /* right */ { /* a */ -0.0048765805688135432927, 0.0053151709295158611202, -0.0056105185624460915395, 0.0058353469265925300702, -0.0095124904947408925326, 0.1474736271262454268, 0.45015598574916032559, -0.31617058194011959937, -0.37500561058249115565, 0.1024040461535024038, 0.09880224296723426336, 0.13507025371908992772, -0.0076921438847904824443, 0.70384742117252319105, 0.39354022432035029588, -0.35987631054416541199, -0.016295617248206911709, 0.0037069899110325136952, -0.18230754888878106246, -0.25574618730660003685, -0.22473349359278305126, -0.086128208326026980957, -0.066843673532245156954, -0.2811472454940759369, -0.071489158758016368989, 0.12593590396064910375, -0.084427226536140737023, -0.075750225784808708496, 0.078348230738386523409, 0.075996002542261575918, -0.0088596280720283637766}, { /* b */ 0, 0.10992763307071229395, -0.031950991955910876263, 0.067764336110112510791, 0.011642549958236145247, 0.065471901287065897845, 0.1673034870980578126, 0.028095206047705489905, 0.027267773057104531531, 0.084579867348890197531, 0.0099220485684850534547, 0.088989181038956643999, -0.021794892683911493148, 0.11813758800985002528, 0.054176192981242488056, -0.10363299382656462888, -0.018662590133854996266, 0.070475304695992779802, 0.051096625691584955653, -0.027165719683553204988, 0.048772571120754747154, -0.0011836521868419450088, 0.026143533279308905914, 0.010018324394546467004, -0.027326001794422516422, -0.054777896142175867833, -0.013206742436717121281, -0.0049659044408859077946, -0.041443238983922443819, -0.01206157172231516958, -0.0033435101275689320388}, }, }, { /* 60 deg */ { /* left */ { /* a */ -7.7511870492402576904e-05, 0.0016441118738663718091, -0.0014490512186687842799, 0.0013291594554154519906, -0.0033660169662663719237, -0.0035405112611824867547, -0.0018534540596054638328, 0.0026523822617419146042, 0.0035696953020608597311, 0.0010309818936765626982, 0.0015555973072872710753, 0.0069861562371903440649, 0.005884164429037497257, 0.0020504561617368248679, 0.0051656079144007938098, 0.0018480741443421826349, -0.0098740636215316479607, -0.015193873352109532604, -0.010129356530011455681, -0.011786926255030749644, -0.017737538763468174707, -0.013045360977154141224, 0.007715513063652479353, 0.0077814785513774520354, 0.0056104852005217642485, 0.032549948194363076404, 0.095042192724825724781, 0.041711508438485589423, -0.0079170798496924765786, 0.06418245741109107616, -0.014766641064020702423}, { /* b */ 0, 0.13754721824368876248, -0.063493641654088772697, 0.22830296737448574351, -0.06090628577308521141, -0.046004693137549623749, 0.21580730819120708119, 0.12307782917671261647, 0.089740574449950760716, 0.32648577436567016719, 0.24035205934268277783, -0.072543872172078915916, -0.012821880001484542433, 0.061865137137434578207, -0.05044571494396132838, -0.20687345392352007867, -0.19352544602058152634, -0.081534524324355928115, -0.11527908326446067999, -0.19205089159229915552, -0.014435573776200305574, 0.091578567882680261825, -0.016821578118150770642, 0.022722319119941603027, 0.083369554422021985296, 0.059078833427872456951, 0.062862807790400876407, 0.050723340750263856691, 0.021365973798814774653, 0.0016529181815633231523, -0.15764243352166251722}, }, { /* right */ { /* a */ -0.0082355372166692739078, 0.011221317614100445592, -0.015398602139821311596, 0.019928042385439565659, -0.016098624365389231639, 0.35687158954924280696, 0.25056043621692913881, -0.58374093063797949377, -0.096587696990415444764, 0.1417547393039359227, 0.12297834557525599841, 0.022570043259149269455, 0.33375919715316915148, 0.760382535490139011, -0.16254361373105752353, -0.19917812853966368469, 0.070067615832109297891, -0.10829091532814275056, -0.18484059920915038577, -0.1432702217603286643, -0.12124479647419947326, -0.15236845595713283119, -0.18674136242612379699, -0.25923778948833559044, 0.0083936426743206477008, -0.099921477749484607922, -0.11575635007653031772, 0.11489835825258340463, 0.05190968921625193494, 0.041271947034530499787, 0.031437997309678028524}, { /* b */ 0, 0.10868828192197363403, -0.074118270899444116395, 0.090777214578766446396, -0.013578916722286824004, 0.070883676521874855458, 0.11959741347631475117, -0.01478983329482146114, 0.072627013198334366972, 0.061154270063062954321, 0.053538843911089990801, 0.10606045726597232437, 0.084565973879056371976, 0.12939459925111462812, -0.071073677257657563722, -0.045887381062256933639, -0.032179006816211025432, 0.040614594623645042248, 0.051338232550410083099, -0.0046888299313390183198, 0.08651005715390544526, -0.012422527402296091453, 0.036899877754051693679, -0.022144609442510329589, -0.063400842038184745952, -0.026440060318911294546, -0.023673563205560410605, 0.0010511162089202694819, -0.047472031235924229409, -0.0013554914729107421512, -0.0048621235097193868033}, }, }, { /* 65 deg */ { /* left */ { /* a */ 0.00021209643066757990983, -0.00031257144469942722484, 0.0016441805216621534387, -0.00081058611586804288351, -4.3648113456917552941e-05, -0.0012284241081988998053, -0.0013372660613575335694, -0.0012448771791878643356, 0.0011663351290325252307, 0.0042197117786080262647, 0.0023254717276821601502, 0.00025887355412090818849, 0.0052097013800850300314, 0.0068133846221896101833, 0.0012296601063083159242, -0.0012431805547497014504, -8.8048805399475269656e-05, -0.0038129513141305082513, -0.013960404317975294575, -0.014560488715287256412, -0.010102471322895321612, -0.012002486002929415101, -0.016113745186924210984, 0.0018967118588925058718, 0.013449767355400155111, 0.012584539113361103979, 0.020867824729736694778, 0.073836201193860917513, 0.067122965072344276116, -0.0018477671601818679292, 0.05223682330510182048}, { /* b */ 0, 0.13309668338776226015, -0.034796214140597747644, 0.20259809733892686356, -0.074229467116257441539, -0.033589853999302365928, 0.17194460518329957033, 0.14053069634131776233, 0.10398223014011775955, 0.28622058494381930061, 0.25553069116036886133, -0.033340385994645727052, 0.0493901404229751817, 0.065507437268241819339, -0.14259732883797893166, -0.22103298760553502511, -0.14786809695042923973, -0.12633674696810315297, -0.12873024948879818741, -0.1027909150680406114, 0.0014565313397746360025, 0.023432772310455485254, -0.066093717438972521272, 0.043814867214386765681, 0.11896612672430972868, 0.044357594944782752222, 0.040347747146118884132, 0.077413706726509046163, 0.040768513366040703971, -0.045448434075889831973, -0.11511235099577465935}, }, { /* right */ { /* a */ -0.0043138529817596110716, 0.0075413039075933347571, -0.011521651041039235319, 0.013325571083565648789, 0.041007771396277606368, 0.5053361523397409405, -0.094698397193346620093, -0.61958974147486567396, 0.13570958419739470591, 0.14441422292394201499, 0.085033815695051417904, 0.092603593314331822395, 0.6701887476182314396, 0.36261635455576279874, -0.3621843326644283434, 0.0042299442428242461922, -0.002366041054087388365, -0.12368382816733622387, -0.088272849346890044919, -0.049419563996561458041, -0.2125426294795428328, -0.1586871870165506293, -0.190927188977616763, -0.17006683683656526052, -0.060741253294065850055, -0.19496219647700138711, 0.036515091593278953264, 0.06314691771158037481, -0.015262096579524153661, 0.048691056102282553875, 0.021226484220801533631}, { /* b */ 0, 0.089542514489504565489, -0.058716409615418296841, 0.10736888709090598726, -0.02331315160544743248, 0.091213288884433446624, 0.017298834005556238541, -0.016589287472655936395, 0.079801817869399827021, 0.035479049186560793205, 0.068019632837512306045, 0.11886793181633235894, 0.13836077542754027236, 0.070163159715686679307, -0.079640800716906573475, -0.0062391578820996523858, -0.024478254830942465514, 0.038586029342448785462, 0.042690244877749763952, 0.0082479014534321548613, 0.096996213193910676975, -0.013540957110730333923, 0.043726799693584783579, -0.050859473091123888477, -0.051383908254952481709, -0.018315577251619419297, -0.026445801315291839195, -0.0068531948455192986253, -0.042271390394759897347, 0.0064541724220136438561, -0.012350604079308658001}, }, }, { /* 70 deg */ { /* left */ { /* a */ -5.1811224841032703294e-07, 0.0001195077510562910048, 0.00054565132884265522481, 0.00036921285875846077389, 0.00033238357281806241161, 0.0012172851626690581531, 0.00026386278322021471977, 0.00076749530397712774007, 0.0027338096357520935697, 0.0016283443813464026917, -0.00062622425994751651501, 0.00012757274674146668048, -0.0011569955119666852639, -0.0045294448897115202612, -0.0047029865648390289934, -0.0036212338211383254816, -0.0092852833147305524619, -0.014348328680399702328, -0.0074853254233148147634, -0.0050769693650531966256, -0.0098573400794665921865, -0.0040309461902393595167, 0.010067145221129281119, 0.004994392654444901325, 0.0063956208098958633457, 0.026055905177485572111, 0.030774492283322522207, 0.020200953112017860924, 0.051526075933797099715, 0.081379623049979143978, 0.0023131432713013877489}, { /* b */ 0, 0.10894635247324369054, 0.08226281338868934867, 0.13188409788832122782, -0.10259859632821832776, -0.036453212321138628305, 0.053734255601595171115, -0.0047133499977286552607, 0.12938685340448119465, 0.34471458269645649519, 0.23193048383982062255, 0.031865410002815397483, 0.15000719272233176138, 0.11166707115740914791, -0.12525365639212693303, -0.12533914392043321584, -0.013940020445260548065, -0.076263219169064866421, -0.13523188830209809108, -0.12570995087821112968, -0.12364896750882703458, -0.11644943785832362337, -0.057756822422969089637, 0.02441554646979982035, 0.0003564445640730218301, -0.021530279351658632159, 0.034706834490041971186, 0.056194495670694455391, 0.033570314935671419221, 0.042081857466388927769, 0.021545695715191603981}, }, { /* right */ { /* a */ 0.0035836200210229286582, -0.0031072734051323207261, 0.0019421304212324103089, -0.0058643234854055224792, 0.15128443576764849521, 0.52834049315792519508, -0.43710112538159973106, -0.47925878830830015431, 0.29492476075622842124, 0.11155941490950406492, 0.042356073563245243141, 0.29913230770566656691, 0.71528723603458332914, -0.047873961502792675149, -0.27559532028674138537, 0.072072004801736505586, -0.052072379004377590539, -0.039855623428972607181, 0.015994912410223841026, -0.16099078872106220572, -0.2483811542539591799, -0.061804120649365870688, -0.23081587273945508576, -0.14671726044973676384, -0.13359308987310225536, -0.11866357264318513898, 0.057726807929955707699, -0.052300350854971928982, 0.0070598896143025946515, 0.040982578067495951946, 0.010737637321303616922}, { /* b */ 0, 0.085990202435275248094, -0.045241177450963329654, 0.10617869357694004195, -0.027274277623547289739, 0.081604490424743256205, -0.044586295972629322315, -3.5857159416154138487e-05, 0.065533207614784261263, 0.013976222370463801947, 0.081284503898977275571, 0.15219632615988584745, 0.14536894803318561875, -0.0047486841226037877772, -0.028328518717180534159, 0.012226862885177103291, -0.023973643258740594264, 0.052947342934830943229, 0.027989269883246792325, 0.019243641513648143682, 0.081454590263969284258, -0.00708365997103155981, 0.048979713260849030987, -0.060966803987036639889, -0.028789221111322378654, -0.032056881092154890234, -0.013506612710420529133, -0.019305102195920839647, -0.036637922409973010252, 0.0051001653031878674271, -0.012499719609549049537}, }, }, { /* 75 deg */ { /* left */ { /* a */ -6.5923442983146108426e-05, 0.0011271001093549047091, 0.00025601249190043554645, 0.0018847194721560711628, 5.0876901303009702815e-06, 0.00012011933336886215784, 0.00083171514300706128608, 0.00052309243540882353722, 0.0011673413852220091477, 0.0026861263670296948829, 0.0010904448629472929255, -0.0025833300498073752394, -0.0036355509377972161644, -0.0054094004553473240549, -0.0060745633297804024764, -0.005798110979324255787, -0.0058363766689689677847, -0.0064945304305980000592, -0.0096925802501451885362, -0.0107794127797433692, -0.0055240783044391283951, -0.00062055389930815163524, 0.00099273240065922419006, 0.011862141140531190509, 0.012128941204794796427, 0.007469531601092538331, 0.019089850497380767003, 0.027868375799752764799, 0.02564535563215342151, 0.040200335544512966202, 0.075140591824576774549}, { /* b */ 0, 0.16821546891768179854, 0.052070955596089651962, 0.15059408780382366189, -0.034484929464922986497, -0.09681834645926257199, 0.038993096989556330634, 0.025165602614909965418, 0.068217434327291756602, 0.28588626697426122725, 0.25322530989441149885, 0.023257670143314590483, 0.084631528479706119583, 0.087623863125815826258, -0.063289424224385881779, -0.04111210934180931087, 0.0062099315267100108073, -0.086630674442783606182, -0.14520617328789287015, -0.11845477998956299714, -0.09507741318859341817, -0.067074376130724089329, -0.049297931923528159892, -0.032629951249585342765, -0.032322618598035202098, -0.028774768976724818259, 0.0050862628908632245839, 0.030059867262149930767, 0.03619620949003865551, 0.040048636948536442404, 0.074784483329731754608}, }, { /* right */ { /* a */ 0.011019275525695253204, -0.013849992827126740569, 0.016917266614222860321, -0.024593574280674067312, 0.2755979158975589427, 0.45173428558416955925, -0.65405270132110782111, -0.27540548350881166595, 0.32271395364772170744, 0.050144850607296634348, 0.097796546761367855738, 0.52489190531289731112, 0.53222901585795523438, -0.28672062269614356778, -0.099921138514967006161, 0.074086470897411355052, -0.054510924206991988317, 0.037202647828410775888, 0.01654229015551119536, -0.26427705887042252098, -0.17851612488609874818, -0.087535243016548386352, -0.25308108532219603104, -0.11270654329725227072, -0.19911311611538287658, -0.087208381822291847207, 0.041575970333826602066, -0.046835263936002749507, -0.0031789718109168432769, 0.017733383501500332713, 0.022284914124549512482}, { /* b */ 0, 0.063654984772485573297, -0.072258235141275717339, 0.11143147791531111956, 0.0087840137916747988711, 0.064463015400774259511, -0.11346145969663629094, 0.02100129439068075532, 0.064648989334362388925, 0.038270361198741026376, 0.071675930769700912926, 0.15879780912824276173, 0.14156427256304554563, 0.0029008342249592002776, 0.013453795811311022868, -0.031978426252195213397, -0.0047055545557023736869, 0.057295800200696245241, 0.019880527866045910601, 0.023882626203728003766, 0.0816614286701679154, -0.011451559711870597236, 0.036329458605499818924, -0.041088532580567209418, -0.023652412022372691636, -0.026671112082336280447, -0.024258466376539916665, -0.018453252246660931113, -0.03518859123466042127, 2.2642044285488299076e-05, -0.017197498276247558113}, }, }, { /* 80 deg */ { /* left */ { /* a */ 1.7418901153948339409e-05, 0.0024829349213467679855, 0.00080662799356590042521, -0.0040748995594475090343, -0.0043772687331744553063, -0.0045817695894234677922, -0.0026921600358026384972, 0.0020317311486689479741, 0.0021593746597770016246, 0.00066712085501630102868, -9.5710687916805595003e-05, -0.0060753720715345238546, -0.015743200903750587116, -0.01434605846804826168, -0.0073507314333337570034, -0.0062768288260767191034, -0.00052040153811216960378, 0.0089624149056388713319, 0.0087255307387040792477, 0.0041380932427198535706, 0.0025873059441433587935, -0.00056427236265477176674, -0.00042937015477806351159, 0.0051603085642754065177, 0.013367090647350976518, 0.026507895717620133524, 0.03763876907939001093, 0.037489388889297425855, 0.028338574035793876599, 0.023157443746341099811, 0.018735089226257217732}, { /* b */ 0, 0.14534882996838915936, 0.14803175382258060289, 0.094844719201528371322, 0.067106074548503591437, 0.0076561274135744650238, -0.045065770755345346821, -0.048916309039123695435, -0.065139716880976972213, -0.040503460437060767596, 0.061896597042185308446, 0.14430131906391363561, 0.12502812778689142981, 0.13307255907833714925, 0.15846438120380168524, 0.072443959380358302624, -0.022362089126953810236, -0.045059346560211155364, -0.054526658792158899658, -0.054612633246867159365, -0.023133071334960342291, 0.0073895288997538610687, 0.024334450270876994971, 0.010667863612340289237, -0.044504676902160089647, -0.098200245560384202825, -0.11766865822868122216, -0.11382238342308448331, -0.093681436951140173441, -0.019605847884629490352, 0.090021698045603115723}, }, { /* right */ { /* a */ 0.015512396634440192567, -0.020391464096575218079, 0.024050195860016859717, -0.029979857909256946158, 0.36905414956375964808, 0.35065405180331060686, -0.82070459684360974606, -0.17294854510044505025, 0.5091349998282543865, 0.070519733383666086124, -0.077559956631959026119, 0.61125406796720882507, 0.52623629698317675452, -0.46897902004352903793, -0.1714417829200720611, 0.26948853777138070953, 0.097069492238713306342, -0.14707004524472033768, -0.096403658302783926115, -0.13634031166999754925, -0.098303552232116911402, -0.18241456272988593179, -0.21530248155336156879, -0.11279416724501584168, -0.23690606176759601564, -0.056911240660061090946, 0.037438849309527962028, -0.04578389942453200967, 0.0046264186300080251124, 0.042007640021230613359, 0.022151274334351871154}, { /* b */ 0, 0.041982195862818455501, 0.08254722741980052847, 0.072664427252597960094, -0.11829377132001502038, 0.070236617743524298874, -0.011901997620548596113, 0.0077893227590393396276, -0.0089008987991332638723, 0.090522189974536967916, 0.095324643530981037487, 0.11754453832870694063, 0.13654235503493533654, 0.034013562766714577901, 0.02340727949840144817, -0.040713847604418457182, 0.015732261217336895864, 0.023791283777080396433, -0.0028896805095383198969, 0.0169974431277371274, 0.072837038118719221735, 0.0039342201881270161268, 0.012312494370343705571, -0.021651764233942757953, -0.021179489185238833948, -0.0081668579190747464525, -0.03054195555383248939, -0.019423375638861345438, -0.04295726081561708487, 0.0067010462456371100437, -0.019120058380112447266}, }, }, { /* 85 deg */ { /* left */ { /* a */ 5.4207905774400502404e-05, 7.5793917808653077373e-05, -0.00036713129453191939433, -0.0015618904773695430066, -0.0024990267563640422566, -0.0026372051095679980084, -0.0019537977059835842653, -0.00080050034712009221494, -0.0018979737133328900001, -0.003172980689997162429, -0.0025624502986154595874, -0.0049276394160913117304, -0.0082707509296842118829, -0.007992069046836025592, -0.0092253530901975633327, -0.0105164612737573826, -0.0039970754482643311434, 0.0015139378144179982399, 0.00047514063947207141325, 0.0032575344298402253429, 0.006201190368149145371, 0.0016213095890837969648, 0.0040644636932485322944, 0.016439269262674693906, 0.02129002660264389668, 0.027932376313460904882, 0.040271769366495568931, 0.039282525111511423788, 0.029202236994929631209, 0.023979121666767300169, 0.012741959251327816816}, { /* b */ 0, 0.058008692718908294594, 0.077001205963933561094, 0.095079889668447936657, 0.05750192471398740679, 0.055385520693063128306, 0.068756639874378855382, 0.023913171111333841878, -0.0029203640386499252202, -0.0029721632491264138309, -0.03824664324664217574, -0.035867937897005042203, 0.053236292890807002109, 0.097727381831724802197, 0.10594328185259405117, 0.15491145954144025509, 0.13646633487365833481, 0.042836349739144852222, 0.005589485785606473911, -0.018748615375624444468, -0.082901956566933110437, -0.080797429955759003661, -0.039435179337715675629, -0.046340158566526845618, -0.048427734634648444967, -0.034067592635106391796, -0.060826253589774115227, -0.084456034839947013992, -0.06411890376520346102, -0.041638553569395275744, -0.011361247130581286768}, }, { /* right */ { /* a */ 0.017637404019566080282, -0.023146976510304839714, 0.026545048936775856446, -0.030274109689290909508, 0.41203671504139649517, 0.29639804351685683503, -0.89791623818012644698, -0.10535778408185016153, 0.60757898399007725931, 0.024978129788012087831, -0.14743139188086634705, 0.71873064564674038479, 0.49418969158774794792, -0.62062564666938124791, -0.1537079765276824217, 0.45739395065715737765, 0.073932804114116082439, -0.32371044784339197964, -0.039912490742135750543, -0.012636479730003882804, -0.14847117245701110799, -0.20037727215219974797, -0.12919185722683890205, -0.16960876451316783675, -0.27984633351919496747, -0.037881302318437670706, 0.011410078671189247124, -0.083369129763727345406, 0.026709242074499095487, 0.075985860814370073668, 0.021280055718898502337}, { /* b */ 0, 0.012410399428397497074, 0.15419767583516708065, 0.044336732203144324505, -0.16155512807170341327, 0.097794779635425668762, 0.028450550355408124603, -0.021886728378568004461, -0.053240842936555163312, 0.12024645298295937035, 0.089631044274977519914, 0.072930089746372356307, 0.15639732412983112231, 0.088433184541984732885, 0.024345740863166279166, -0.020881518480592164977, 0.036574638166480696877, -0.0095547481038585346802, -0.014256673297645752752, -0.011645669012270293274, 0.059601517433541598145, -0.0071614952672649674625, 0.02250688614354422884, -0.010717105567844815647, -0.013790642205040518076, 0.0052048230799340358677, -0.034950820363846904493, -0.013621506644743638925, -0.033005877849209136476, -0.011242747822229337551, -0.018391922098279223086}, }, }, { /* 90 deg */ { /* left */ { /* a */ -0.00021027350211119634135, -0.00076954670552575963477, -0.0011207516659172984258, -0.00042666875046948500583, -0.00054082018030587875046, -0.00081260628920221122939, -0.00090837626309792085522, -0.0019174726827164700893, -0.0023521897586642470657, -0.0023920627754969734161, -0.0025815123637362704864, -0.0025258929374494254461, -0.0058967493983541618974, -0.012319825143519702593, -0.014053078285086728627, -0.0091114297819105960485, -0.00068447180839870114255, 0.0067545738888230566488, 0.0060516706282265353423, -0.00056778821963532344341, -0.0024491019702532765626, -0.0015151936721968795041, -0.00056192173400471156011, 0.0046321597563236949213, 0.010342522776957130404, 0.015535668206057007268, 0.02835261129333077959, 0.042384537828482615751, 0.048529210478764905901, 0.049409287418838987449, 0.033861063585272077603}, { /* b */ 0, 0.11751352912328649758, 0.066881041690391995758, 0.011611767165436992499, 0.03294226308819814264, 0.025103883935645443515, 0.029312215250876239026, 0.067710098670265006504, 0.042243824341647862042, 0.0026960360979821906824, -0.047575363222307487376, -0.093041097951607198979, 0.00046041687407072373617, 0.17926292561601386844, 0.21698522719396096115, 0.15024545135314260058, 0.11181873055793323246, 0.058785092002106020814, -0.015643363836109758225, -0.056250849052585927268, -0.088323964511638486385, -0.1180599631592227361, -0.098079574614301501256, -0.054691967391884421801, -0.0042877756914472264782, 0.02967474956150351062, 0.0041033038782056774352, -0.052367108693135433484, -0.096005862271902886462, -0.097642108675688454866, -0.049513994578587183781}, }, { /* right */ { /* a */ 0.018150091886578817446, -0.023845130864017311662, 0.02775998848373803507, -0.033769769876715663437, 0.40491345429583497362, 0.30159629298977624901, -0.91025359983279008347, -0.081343437060522535975, 0.6034854052168470151, -0.016960078838921387179, -0.10269926345311472526, 0.76352954683775542399, 0.40219093258717791839, -0.67920968317533791936, -0.056851256921459925042, 0.50905276924295583818, -0.026665421050103131628, -0.34920467562186752186, 0.0904739783458112512, -0.036397887595374447955, -0.23393069424555568148, -0.091199150924403324381, -0.08447542487670205158, -0.2564507423497264238, -0.25721831617591872643, -0.002125597952633978549, -0.023743067912420159904, -0.14477973281574843534, 0.022873577043523718455, 0.10671418109207270186, 0.019985873195510830969}, { /* b */ 0, 0.022491626840903319873, 0.14018081549356001259, 0.036298385305407951384, -0.12830863123070554432, 0.1263510274922885479, 7.3727942596565898548e-05, -0.040013158347134217263, -0.040805047872806074483, 0.10760179031267538829, 0.050746002994671302044, 0.056791978592174836848, 0.19465630967095987058, 0.090536167472289943992, 0.012593323203309580993, 0.023442724816696527967, 0.052788767871281977451, -0.02033437245395515458, -0.013196282948289839165, -0.03588112911393463722, 0.045571940713064196249, -0.036429356549544406052, 0.012429019951958051801, 0.015175738110519865209, -0.005163890233013043729, 0.0095466567671172869458, -0.024098419125345715841, -0.0027907433619838569946, -0.029257612807875116312, -0.017229223565869491996, -0.027034952156425318126}, }, }, { /* 95 deg */ { /* left */ { /* a */ 4.3144119567767368149e-05, 0.0021302951028895344976, -0.00072025735438352445072, -0.00013430419547322269835, 0.0021619131040928616164, 0.0029562742718397547539, 0.00096759804273094471988, -0.00066731916388562597525, 0.0019554424952883397992, 0.0010573150741738377226, -0.0057630517610873779541, -0.0042654429244920457828, 0.0015852209983568954499, -0.00080285248435507682897, -0.0069895806820152728278, -0.0091754745607658394491, -0.0046974684961287316298, -0.0031730985117911503224, -0.0059280793673899268015, -0.0064032724680918038165, -0.006423050928003326554, -0.0070405610571450116808, -0.0077339430447354029496, -0.0014087955666625129325, 0.011971743844804705326, 0.013240980043030536883, 0.0092823699160415884535, 0.015909933135591081133, 0.035265748517532280459, 0.056161277110985952099, 0.062561299477500997845}, { /* b */ 0, 0.20709919017362909965, 0.0098618492626323384087, -0.022612805280972092525, 0.084165341115993719256, 0.16295141133805535194, 0.13525992009599807631, 0.076210698016637712371, 0.13542574322733536007, 0.12770426112175548017, -0.15277262657230339382, -0.19301078065525612004, 0.030943661178395309719, 0.16248284197585560751, 0.21971897027288356252, 0.07839165727906161063, -0.06874609237615680879, -0.016754077436093028908, 0.029805198816373890125, -0.077448460786694317548, -0.15288485929854100931, -0.15750109847730009438, -0.14646534862002014155, -0.085980202811780648275, -0.012868257388554127374, 0.047737443159209802523, 0.026936777247771326316, -0.030203923302996038558, -0.015646012142198073569, 0.051186183679524654977, 0.1190345000479098303}, }, { /* right */ { /* a */ 0.01692233902813708446, -0.022198608990108524563, 0.028099027819879392187, -0.039354076304459403857, 0.34863248838263793949, 0.37030810409398823291, -0.81202423172712479005, -0.10771914287425415901, 0.38881054615390941986, -0.0028186697992533052415, 0.15279498696206239572, 0.64893570506150766164, 0.24152380950455987207, -0.46843371022348617716, 0.040251807388405093369, 0.22185368445738418153, 0.026645189291616723504, -0.039489443724228558141, -0.030196096577209466383, -0.28276446496745261117, -0.10981838965732558522, -0.014211428795898178867, -0.23828445961990032953, -0.20240959014934223337, -0.14479536848323548703, -0.09799054788940303462, -0.05841732980083247373, -0.079964546967404639966, -0.019575448765071085111, 0.084889554289851065771, 0.056574151995427736372}, { /* b */ 0, 0.044253003048792295682, -0.058688959402343476857, 0.11139315219106762922, 0.017428467999755184459, 0.079856031028604626543, -0.094212947161441934485, 0.047957245507034521048, 0.0050481755695976071596, 0.035439933418202063109, 0.084984660605178799497, 0.13136657987866395825, 0.12922176951737388007, 0.037151492684652648313, 0.060936255183892382159, 0.019033300477288780939, 0.046573677877307567696, 0.011154648339030230619, -0.020788905402422175328, -0.029532534082383869734, 0.017164554652654588629, -0.046263076050861294541, -0.0079167598297791019757, 0.022379966080907434667, -0.0091716797912888906041, 0.022277703175120792262, -0.02238749197036766711, 0.0071438113455552301745, -0.036059010862666412978, -0.0043682279381737978974, -0.028520125641734627581}, }, }, { /* 100 deg */ { /* left */ { /* a */ 3.8678007732439994838e-06, 0.00036880559217689068419, -0.00071422931596787375425, 0.0015315462861820172691, 0.0013974373520159177886, 0.0013013753347168579774, 0.0025956690450495995687, 0.0032526644595798348547, 0.0036340130423612171384, 0.0031337673469383755739, -0.0031445933911661283489, -0.006291570253877387664, -0.0031212408654196499569, -0.0059143209433371035644, -0.0094436593248842237713, -0.010033109807058848695, -0.0091828205094068859893, -0.0050242048843518460899, 0.00022635591977182570257, 0.0026831373144825532151, -0.0025832568337907928398, -0.011199233881722947537, -0.0090800117833605975548, 0.0047504101117340491456, 0.0074455714467458466999, 0.005686961780868027283, 0.012409919323344564823, 0.017226539487935621509, 0.028654026888730310674, 0.068762734723379348445, 0.072600415099710602362}, { /* b */ 0, 0.1413129266600310352, -0.0073914337867658774783, 0.022834191067966358446, 0.050140980169949278533, 0.049027788577155062555, 0.11641762768903329839, 0.16322290968165398262, 0.19894767328013096552, 0.22894987291049995193, -0.027045810778655865469, -0.26571378944677259692, -0.047611977908035285623, 0.11705887087903876775, 0.065492599011507390827, 0.080517969516941123587, 0.064856092412760024679, -0.02627393330616178968, 0.0076090381427584841134, 0.078206132751237888989, -0.053194635189005023967, -0.20185179645061668285, -0.21971235027985758226, -0.16978804320735840783, -0.09891850269103108495, -0.02115339760265511071, 0.025780282346676841598, 0.022902251530926287515, 0.020839531242738962291, 0.074518988234795191516, 0.14546865989319146539}, }, { /* right */ { /* a */ 0.011966198050782757278, -0.01496833593309099264, 0.016450527454028689156, -0.025926850401778410438, 0.23555114438391683285, 0.4722188962311174576, -0.75234591910942427706, -0.27801732081729912949, 0.53915520795346294491, 0.058085551110777060291, -0.058566576042035599359, 0.51853021102951979415, 0.48054627214607975594, -0.48585026237959572093, -0.15351342024705222356, 0.31670886696633759883, 0.16315084986006778145, -0.10738911933637247664, -0.11149882163329602469, -0.17039061038015274052, 0.0042422902277487392619, -0.0078028915498091350189, -0.36061792668445225019, -0.15431112049922079965, 0.0056192329624029507817, -0.161735335935920016, -0.16088938293551427461, -0.014354427764549752833, 0.062287468304296059185, 0.024598150199371844604, -0.029702161103367999417}, { /* b */ 0, 0.11504375649924208913, 0.021651963885253810993, 0.10021424308853918439, -0.10065297428003720792, 0.095000281296097124906, 0.023494773330606733008, -0.016304743455830727344, -0.084119092396599648431, -0.0018681129193348286477, 0.16086967464476359391, 0.1547736184561407935, 0.035506119840447707137, 0.0021680979266731487121, 0.14736967829420749565, 0.032388603988108173592, -0.014040054102954644538, -0.0074069314810135834098, -0.0068700930707776136641, 0.0046630860661743883319, 0.0017586704099742042628, -0.032198686096395617851, 0.0050750934625035867831, 0.02081839662318105133, -0.029219757397332818405, 0.029697584116748429461, -0.03943419296503075655, 0.032075243587325115435, -0.035072374385213510306, 0.0035978369066023275884, -0.031802406372611821683}, }, }, { /* 105 deg */ { /* left */ { /* a */ 9.4464175203451297529e-05, -0.00034244421284745647348, 0.0026178336597765267807, 0.002987633016607316172, 0.0018853869852841764754, 0.00045206286006238376174, -0.001268446398333677571, 0.0020279656421512415321, 0.0030288385766130687671, -0.0038811095125906858172, -0.0075575813094502786171, -0.010229789842788883369, -0.011581592352233327503, -0.0073160070666877796697, -0.004986785201444021709, -0.0045074024905555898357, -0.0032919373525036607978, -0.0014195923712934097657, 0.0015888908617284211791, 0.0045270852556261731436, 0.0061991054128851530436, 0.0029025465434623365368, 0.0019189911238531860531, 0.0066606047902095788515, 0.0079475207345747200804, 0.0057883047890894302745, 0.011572011089297510461, 0.018921730568569050668, 0.042937813008875336251, 0.071911292230178447404, 0.025067402116066284101}, { /* b */ 0, 0.08696686852271984236, 0.01578577589152196925, 0.080596070642993677957, 0.078967631586684960965, 0.027571309059240545203, -0.017849018280266526482, 0.03678492740549765827, 0.26450544155613708863, 0.28130387428208780687, 0.028682499716783937949, -0.083076202529522302775, -0.11054641272073562064, -0.070511572391532273407, 0.072697528049545101503, 0.08803285558675599809, 0.060692369318604555417, 0.091712773311602990844, 0.056769837322862004569, -0.029069460460717788663, -0.053468190293962103432, -0.049532799916429670617, -0.097734676907518247546, -0.1433145927644957629, -0.12552474600482921296, -0.10327250824185285616, -0.097065348691610653376, -0.057873120256762833336, -0.0013652695425581118371, 0.081695758853764233187, 0.15936741351876837491}, }, { /* right */ { /* a */ 0.0015668016976515403149, 0.00045427934985357160125, -0.0040624383178386076765, 0.0033630907472987142323, 0.090224127649338028978, 0.55691589500825799952, -0.45046585761131857639, -0.51700272135909752791, 0.40994229687848926513, 0.12186291752863150084, -0.017702323542065183382, 0.3852700380226054544, 0.60735360287334350105, -0.34406050321392755986, -0.25331881626544316966, 0.32373118512070442332, 0.17009464975948093701, -0.11799552026600904076, -0.053982922896562278436, -0.10496289068836175962, -0.17613957317129758096, -0.010978053477058748177, -0.22407543854546807527, -0.22678697091639107852, -0.099112038357802939581, -0.10828770800024090093, -0.096155268437089880251, -0.071548024391486636508, 0.0031216356084383112268, 0.055150743162330623237, 0.0020468437013712518883}, { /* b */ 0, 0.074935774006172503614, -0.082168941655711369432, 0.13844432786310970074, -0.058480690143646735235, 0.11667134772661268138, 0.041131301620027371779, -0.059720708901109774425, -0.015459233266758992675, 0.014607460522074285775, 0.11341577404696766285, 0.14390743799855879037, 0.10101969001017635508, 0.018064679750528361835, 0.093985627682125455484, 0.023710957272608974844, 0.020682315887456118736, -0.0082715441267720846152, -0.023816672842006357536, 0.016464978742749061813, -0.010626858727223569001, -0.029205347423567375176, -0.025576540012752640996, 0.023889155526357452874, -0.028413243782442719476, 0.035434099354063164355, -0.041507684576278999766, 0.044291022458608879375, -0.043082373704919282864, 0.015778813708729882981, -0.0355929261714078779}, }, }, { /* 110 deg */ { /* left */ { /* a */ -1.309667384352426468e-05, -0.00061238318339873476503, -0.0016670731304430086439, -0.0014611074396903012129, -0.0013514815526416419471, -0.0014923048672482728313, -0.0047851932726689083708, -0.0084144403305480564015, -0.0081578614171545771327, -0.0071634186354224693716, -0.0048760878632037041314, -0.0019702122355108563079, -0.00039475779929631568677, 0.0013245241139991958176, 0.0013479559485968274635, 0.0020580642721979014453, 0.0056999761501724810486, 0.0090073449320743348423, 0.010529556221730573817, 0.01158655953362175417, 0.01127516438069464666, 0.0077818288692077519642, 0.0073530654720599386565, 0.011622573802480551386, 0.014405918050339194814, 0.016984436818426318361, 0.021012748511878287516, 0.030158607004018844755, 0.061966094625845451194, 0.027403379903104263526, -0.023880726698483067949}, { /* b */ 0, 0.053318079201170043291, 0.011064278072347999426, 0.054140974536862063182, 0.031002934313129060229, -0.053491157458798725688, -0.13046741982040976904, -0.029661942213682346292, 0.22939319402809354997, 0.24193695175984963885, 0.15020956842450028379, 0.131262422400565959, 0.066188955555809836362, 0.05079161501511664234, -0.01867327535411134054, -0.069402381644226296409, 0.022429179740643401253, 0.024520253971427319328, 0.0085418548669696815756, 0.059209236950297228219, 0.022315975949510624687, -0.061762492375855293503, -0.047355749546590386601, -0.0008467798533889903112, -0.0042025996453004532682, -0.014104953056232050201, -0.024569466304663611922, -0.052179779108096902007, -0.088391765753551010398, -0.11757297369387187391, -0.11682440156687845523}, }, { /* right */ { /* a */ -0.0097350431312497598402, 0.015482519303677139133, -0.0236709560834293814, 0.032716952161958127998, -0.021186002237671280879, 0.49063496764359487701, -0.053611641899699476188, -0.69339229561045856443, 0.2531354733319123862, 0.19514698973700089768, -0.0034329576007472231702, 0.19370032104909776227, 0.61944910438216083115, -0.023758962855663715019, -0.39063671190927723442, 0.24685431267866464466, 0.24316308284436491394, -0.071477629128430184013, -0.12323689128967714457, -0.025006304592077414906, -0.18000479907094349419, -0.085949375769707014872, -0.15130158860041317825, -0.24225203164662723054, -0.13477995139787868339, -0.10915578320838900672, -0.052342989122419747439, -0.088876098193230390621, -0.030830002652761610837, 0.073681981632048226816, 0.00916070516668136825}, { /* b */ 0, 0.093839709295710768688, -0.13940626207778822332, 0.14604782141311858923, -0.030637347776664262955, 0.089197237289730460508, 0.12447339357294055773, -0.08808459118423306311, -0.0030632245232508556465, 0.023143885267244691112, 0.088977747081065997059, 0.15688125838616676089, 0.10509645690274375951, 0.031561154657990669881, 0.056260543647721261706, 0.028330076578537782828, 0.017823918696284149488, -0.015781512822110599359, -0.029762747061987809838, 0.031778403531169951979, -0.012599544304873165623, -0.027143550201066436733, -0.033725115150895837446, 0.007539852218147596874, -0.022102951250232635849, 0.025737829876023434611, -0.039906391082608280718, 0.051619486429567776331, -0.03681355675302314806, 0.021735208940261083188, -0.032249935928698944543}, }, }, { /* 115 deg */ { /* left */ { /* a */ 0.00013942449105569176761, -0.00029118390563326237291, 0.00022469527204138639576, 0.00037784487202235927938, 6.8148422981140210908e-05, -0.00055012036023760306491, -0.00017107817051886797799, 0.00086004933896877133748, 0.0017649907087941008044, 0.0024257156893206510695, 0.0017981001016950659555, -0.000523941382189748589, -0.0035758145046360621799, -0.0045305571148845889817, -0.0047015341152548094372, -0.0071128570323930641328, -0.0084398977100511064775, -0.0080221088034210207007, -0.0097193916145238423709, -0.0095620836841614487156, -0.0047173685237961171524, 0.0029446533543128765482, 0.011042163645669234029, 0.018131401262645729933, 0.019064528837507699333, 0.022336489023215555516, 0.030683382765510358592, 0.072432990680347530965, 0.05566116299669798817, -0.022451281695354263768, -0.0016246083237719845249}, { /* b */ 0, 0.10160865983710465343, -0.0084893985911882463569, 0.098656925751963719939, 0.11538695058401632343, 0.0029827292803707994295, -0.1115621224458476779, 0.00024371850308735343305, 0.29946499607094723139, 0.25129923915422069935, 0.085404819556295086258, 0.10125239327595653149, 0.13313095025790228076, 0.12516283172010755909, 0.033605136931132151279, -0.072097613554103490152, -0.14633661861489233313, -0.17418014311789548065, -0.098961418529240618991, -0.061263955812435044734, -0.085098411928968831219, -0.04496168292497659813, -0.032656829860241987085, -0.088768874276570763904, -0.039613918116597479635, 0.037358619477956267474, 0.026565492379435062809, 0.040526936886213504874, 0.053534521469930651527, 0.014505389111275910838, -0.024861739940824911788}, }, { /* right */ { /* a */ -0.011093287405129442433, 0.014294408261423564854, -0.018378514697486338092, 0.022532777726584116151, -0.030699638831704033348, 0.25907586376942981499, 0.35366673996007236269, -0.66341804511645396936, -0.10190680423687648037, 0.39806769439849831738, -0.074577292316266766137, 0.058450823929609249663, 0.57243656900714623426, 0.22754131074863476192, -0.43903162085690844441, 0.16412776225961495102, 0.3403615484415121184, -0.049543018421195975098, -0.14402901381840427231, -0.038975851083568324729, -0.13613905270452761331, -0.12963800935446376239, -0.086825198761480759657, -0.24036202841746270864, -0.17799756582542053396, -0.14065958789134627716, -0.10391730580476109258, 0.0086228976871197474119, -0.016981458250357045481, 0.0026454871184357700575, 0.045309008599547596907}, { /* b */ 0, 0.068192103314683172322, -0.061669001785108826241, 0.01395546386205766265, 0.068994778020183222811, 0.092885954115612900939, 0.087322007906250234677, -0.05372210536269423492, 0.029172058847717546176, 0.044405376757425570056, 0.057849167924908816152, 0.14699406690442545775, 0.089944467205095551821, 0.075583888107812677304, 0.052866776009121915769, 0.0029402623440057946806, -0.0042458379854006314535, -0.023984315872921900537, -0.035880772482231246268, 0.019422392492089886329, 0.030931664043963580379, -0.013971230482688265506, -0.054088307483422283506, 0.015147931433324643424, -0.060471716411530249125, 0.02539520388936124598, -0.036192334006072787722, 0.038136007919063227845, -0.0023172886767179011469, 0.013993189017700267962, -0.016096950709648318034}, }, }, { /* 120 deg */ { /* left */ { /* a */ -7.2262671827473773205e-06, 0.00021137481615723910833, 0.00047060124644393683431, 7.9837206741482360725e-05, -0.0015860829008507160154, -0.003324635078419402312, -0.0020038651385792527471, 0.0010743732347523477638, 0.0035367302569574987636, 0.0037129599008908767063, 0.0033303416441948785476, 0.0034552064656981351654, 0.0031470039602021766638, 0.0032199891907003226448, 0.0011094837919917166502, -0.0045865829201990893083, -0.010334055626989857579, -0.013081917360317774079, -0.011671678229047133257, -0.0095789163916809583199, -0.0042091261113694211637, -0.00031535904488483312846, 0.0016833268137381174334, 0.004271428691686451895, 0.015849235636376801661, 0.023900184131717128189, 0.064088261183432859713, 0.073371531546864710016, -0.020243074718567788395, -0.01291555641776132024, 0.027781266974009899418}, { /* b */ 0, 0.1153786319833122187, 0.033470230237989118116, 0.065880011802729732118, 0.14410401144287349195, 0.073978442038033498385, -0.073173764431264110009, 0.10942576385807034622, 0.36433920385721407786, 0.1935859346975654649, 0.043272615446177102594, 0.036373710836958006443, -0.040599685044405420253, 0.01509110368821953152, 0.040262603654243889206, -0.073363608563761784076, -0.10625240212336350965, -0.13942337976260987809, -0.18241885025176846069, -0.11843255686854597952, -0.069344142937972919061, -0.044163662314966600775, 0.019034985302424090037, 0.059005661138498977092, 0.066810227270786004539, 0.050514892022991697562, 0.069291521255163135429, 0.072269225925743196814, -0.020010108109196067527, -0.050848664101162122098, -0.054208314001352730926}, }, { /* right */ { /* a */ 0.00042043829732560378254, -0.0026942172581595124833, 0.0059841555066471631419, -0.01070625760087127315, 0.013960005139680710731, 0.033288064213549649339, 0.46415670738615477653, -0.23584123219842412222, -0.49742803604778829119, 0.32618315423010030285, 0.10695757597020510987, -0.024407046527426604077, 0.25862288808148653496, 0.43593051408603211705, -0.097845318288349691915, -0.12989829461206447991, 0.24916628389953562883, 0.20835511501327691475, -0.084299476675381068702, -0.21365480676733850096, -0.052461013067177722502, -0.047057771811738306755, -0.16149470478124788864, -0.21587916625733602483, -0.15596401194622733222, -0.13849896023468763473, -0.14956880244593814822, -0.039030618517181710214, -0.021206352760830340931, -0.0088528002070362155074, 0.048871936650565078741}, { /* b */ 0, 0.085351109527296825652, -0.11590278249875042571, 0.053546767390562494127, 0.074919546368423864391, -0.0035077009333294197069, 0.16797329487910725443, 0.022317478922057387009, -0.11473244788613998213, 0.11005313665454834193, 0.06016798586990554365, 0.13623473513239403587, 0.091448580907950410834, 0.072340642627592710578, 0.047742713236860995218, 0.020330236324720904473, 0.00068758880059690413722, -0.037753658176874725638, -0.018234949665778960037, 0.00050008863222792548919, 0.043357848545674641805, -0.021018098479127021727, -0.043587923975502325391, -0.0027822357407097236814, -0.046056280136991777086, 0.0099491877322529023719, -0.02693354394970193938, 0.025567960137179608637, 0.013183576335847914385, 0.015280040867320272835, -0.01665173962277395614}, }, }, { /* 125 deg */ { /* left */ { /* a */ -5.7581132945960734806e-05, 0.00064948927000485490169, -0.00030281755231814709399, -0.0016139543534271494352, -0.0028540076139893510998, -0.00069932054189147940804, 0.00040557645956951215993, 0.002287262538813731455, 0.0052463534689142811429, 0.0032526905361166011214, 0.0023591679716716863757, 0.0036377204579163299573, 0.00069868315931420968412, -0.0028582077860397868407, -0.0034227549605345165828, -0.0052880765379764750611, -0.0091447628576893404129, -0.0091561620299898671682, -0.0099534071835646886761, -0.0072195747947978450298, 0.0004740145097964497704, 0.0054870306801999002566, 0.0052488173069020760408, 0.012925204477994001184, 0.018778806908058276459, 0.053969855680208178583, 0.093038142662399403449, -0.0068153728441378014224, -0.034268778804982802377, 0.026583882200004183005, -0.0024075520452249143943}, { /* b */ 0, 0.099092019363866690185, 0.0087517440291312587064, 0.096491267048796902639, 0.16342077613768629663, 0.041201858055478490783, -0.1175707893002683746, 0.15420751412906219535, 0.43588039982098147895, 0.18642586019690376986, 0.056413400277011138684, 0.031866802650444558953, -0.077302578875594607499, 0.029927363015720687134, 0.0017402496533050482164, -0.13997630338099392722, -0.113035329772255555, -0.13352392733995827045, -0.10298695693605752766, -0.04326825474416928774, -0.11393581492328413995, -0.06559839813850137924, 0.038815055255700385561, 0.030781327476601946097, 0.056987065056787744588, 0.098012456777943346431, 0.068958606987759574203, 0.011201442200667321991, 0.0026327055667116350257, -0.013589254772850001274, -0.095569145918267262019}, }, { /* right */ { /* a */ 0.0075183561421753863918, -0.010436048359461352897, 0.012740024716386723347, -0.016114742188342266738, 0.020025116608144918895, -0.027263264945716000898, 0.24753853818150456378, 0.27118531986500399311, -0.58866565184274277645, -0.071171008282390368915, 0.44792919886633941751, -0.068263227306014959139, -0.09652718239072137496, 0.52032593224742407223, 0.1901601808898969459, -0.3318782249512020055, 0.23531611286604497968, 0.350087143838723025, -0.096030647934270838006, -0.1960682593386528505, -0.01274418685537088633, -0.099505400015498790545, -0.12575831107495658023, -0.12198877743594112311, -0.21599050364756824938, -0.17300979780852390744, -0.084674809326234362628, -0.093016237510280097567, -0.081152149354491581734, 0.020578498556179242174, 0.059782309145633115433}, { /* b */ 0, 0.079288650579058719825, 0.039894740617003009164, -0.052060688524599788018, -0.0054613514197847726206, 0.11873078078229983012, 0.062957485088546372154, 0.048153345581620175808, -0.041180981923197274019, 0.076072955387394947113, 0.054709085033151534649, 0.15295131928289695811, 0.10385187848640624331, 0.0068785110194377954707, 0.063340427332151699735, 0.041550837520348653242, -0.02648256370923682268, -0.042126265048679154002, -0.010657528361768279709, -0.0061631088717119877907, 0.039875390696639083365, 0.0095109303333137593106, -0.050126654616640571593, -0.0049517103930521097488, -0.042935357546479424595, -0.024702225965536787206, -0.0089685459519865708133, 0.015917359637452496018, 0.014042791065134972717, 0.035103098473886019948, -0.015108788392181160543}, }, }, { /* 130 deg */ { /* left */ { /* a */ 1.1812758242913043642e-05, -5.5901626799801859558e-05, -0.00051669836013956975569, -0.0012710223678408238968, -0.00071126548338573680752, 0.00059890656135819231309, 0.0015958964632439842646, 0.0024059881895133194973, 0.0025038508332658748756, 0.0018244612608186998488, 0.0013785031645341394579, 0.0008901754070672653063, -0.00044113225364239214144, -0.0016912166763555190607, -0.0035638006112836927153, -0.0082546755705153983251, -0.0099357213378253837754, -0.010172744588574086227, -0.0066835498931799852684, 0.0024028444645801672053, 0.0052078603414440483022, 0.0042555749380640550683, 0.013549694026088188181, 0.021317888175206856083, 0.046844200248669087827, 0.10684921842064876163, 0.011220217490531814164, -0.054044667341171526154, 0.029068939411819316732, 0.0053611345657289533051, -0.01814694018408002929}, { /* b */ 0, 0.12251311485703131332, -0.0048966409354339601734, 0.043225474417180054232, 0.13288643283357326474, 0.0024753584727116306752, -0.13493550284474076228, 0.25001905995872264477, 0.46116198007706277195, 0.16767002957919496797, 0.12022113801239686648, 0.035092266079117528932, -0.082874925052406345216, 0.09299057500647411878, -0.010335927920560039617, -0.22303158437285419691, -0.17736799351152077175, -0.15576870378924967397, -0.09553559118941068462, -0.010527352803241241119, -0.039461536134599572989, -0.04397576750678200419, 0.0022546490695968257612, 0.045224075152991427551, 0.070264909304215694696, 0.061617087093734923542, 0.035144339289305825957, 0.023098222545966939911, -0.016722037124855537726, -0.041553072690561632108, -0.040322919942353818712}, }, { /* right */ { /* a */ -0.0003954638475309746326, 0.0016802147026744734815, -0.0041307781481307566732, 0.0069268081880503179493, -0.011149805097107265417, 0.014711395451955620872, 0.012661300819154924779, 0.376705963309491354, -0.091160582263321632279, -0.49515815498233545222, 0.23973469451584847323, 0.25725972791418044716, -0.1364809441059457451, 0.097772769740633494462, 0.46604942100162649599, -0.076037106709709686991, -0.041141158584846390656, 0.35232917095899790594, 0.13782727738610198176, -0.13520175195935402179, -0.150874719704523097, -0.083235944983574144951, -0.078215007079862383654, -0.064032710649359989019, -0.22784168154062375833, -0.1887778082459686535, -0.054015447047816439463, -0.098555610973257296026, -0.12211294722235141452, -0.043146183514660048364, 0.0049622785846126921117}, { /* b */ 0, 0.068255698670396408589, -0.019626044183932569304, 0.027022734233770818318, -0.029199728361064755666, 0.053847894874170493251, 0.074286951068278456178, 0.093327301540100923716, 0.0046883292136945808881, -0.014905365299500671072, 0.077121161747451066892, 0.098097439175047873583, 0.078872250090676374046, 0.022649650580929860111, 0.10118989200943753759, 0.032708378546854668945, 0.018610044422722078761, 0.013278570298379081815, -0.018196151545185959564, -0.028528768151272497489, 0.0049331955231501209078, -0.015694823528042758931, -0.045042267051635491437, 0.022953317535046903475, -0.049253424540020296352, 0.01848907971264186767, -0.013561713523798677589, 0.017034870128463178163, -5.9926623485577479311e-05, 0.01361690711632057571, -0.014890291483199591394}, }, }, { /* 135 deg */ { /* left */ { /* a */ 0.00010640586492385905107, -0.0020863220798889004458, -0.0027546738669975696749, -0.00057689734912769186082, 0.00066419501364156662872, 0.0020730048205103157599, 0.0042753920946603241049, 0.0024273015306053302709, 0.0041430994752317245461, 0.0090535447899720046527, 0.006478835994985780028, 0.0019980716855355629136, 3.7437150879338076948e-05, -0.0060434387033625469599, -0.010258699474491317361, -0.010462940875158310838, -0.017758528357350589211, -0.019186225865344685992, -0.0056492490439069530106, -0.0015221615476401738343, 0.00065944081514835188249, 0.01116663625060076992, 0.019168392713514448289, 0.041054080523461600194, 0.12181615837242310008, 0.041202139539203708196, -0.067452937283843383831, 0.024205569470678308525, 0.018561269636285793183, -0.014617104953928983235, 0.012766910383738006018}, { /* b */ 0, 0.15611339107442223639, 0.016778431063749214142, 0.081041717545221603203, 0.16997935467485958405, -0.064237394333324648876, -0.1467946458799662679, 0.31367196839646172002, 0.41053110185970687063, 0.092442334293230121745, 0.054708062922834144182, -0.05471108079559138665, -0.10471127127917312372, 0.12256479566694067351, -0.041264754456551977491, -0.26877304811281921282, -0.15682178410143798875, -0.12960269481887554122, -0.074410637441665872238, 0.040540669179120469856, -0.011041781803264316686, -0.0015913537167872027212, 0.11404907080604653746, 0.089380662718768766339, 0.040644184712002040527, 0.057264541138690727706, 0.03605762351477359573, 0.002108751488011373354, -0.036946082845115690851, -0.027051392492011272495, -0.14859598965757947475}, }, { /* right */ { /* a */ -0.0039158275946397091971, 0.0045651814713915106481, -0.0053509730125501937109, 0.0060881631249679723367, -0.0069729162432800844557, 0.0074547800273452868858, -0.010667169556234295386, 0.12038098870040858657, 0.32619730270482744094, -0.33417848277127332191, -0.25402146762454541618, 0.31913744062667975809, 0.096220172381067059497, -0.12010643039258775411, 0.23997327133401527566, 0.32270779230925061842, -0.14215569908666408905, 0.164853962412100985, 0.32719285053214147707, -0.029655260724431586894, -0.17571807629752189683, -0.095723928936843727389, -0.090418165187601373667, -0.10250068810447621193, -0.07679258050520215706, -0.21946952455217211275, -0.15779039960212257188, -0.0097222428803184907098, -0.085743480977948399735, -0.10062298804902622407, -0.039130299227052925404}, { /* b */ 0, 0.060566366555303216557, -0.033585461857244328088, 0.097375755251810053315, -0.0057979207029488586539, -0.013037187911631165083, 0.099547705230398603193, 0.065450202271855356662, 0.079607690447289047864, -0.016594043229971669473, 0.0039141099964726949745, 0.11239923309603364054, 0.060828670912557031292, 0.037661575031187194407, 0.067372873971643737478, 0.06127743996696152079, 0.00425967189704272442, 0.049933361264478656749, -0.011891207176021113476, -0.043937700071649057887, -0.01454360809969700713, -0.036771014605774601791, -0.031196266083756418741, 0.03340208106078057515, -0.037511987641784816372, 0.021432249770140368583, 0.00047072404577540305493, -0.0042222493704937736486, 0.0066621020424406339477, -0.0071434454623851111055, -0.0015815756864876948096}, }, }, { /* 140 deg */ { /* left */ { /* a */ -2.8322500534026556936e-06, -0.00053066106186355809296, 0.00082483518027906630593, -0.00042863322878908282666, -1.1879332136033315948e-05, -0.00066783173309145670363, 7.7773664591825947327e-06, 0.00214109388265923406, 0.00019600041728518038876, -0.00012057335090423157431, -0.00083007319325381981323, -0.0016636900295081960208, 0.0032933505128562882633, 0.0011374034858575837043, -0.0017964573410626802699, -1.5318938721698739658e-05, -0.0039285770478056369903, 0.0026668064562369859886, 0.0064403246606559161336, -0.0039511678598391775097, -0.0042266883104082053624, 0.0068954789365915933677, -0.0011256836162168446305, 0.085086384090781591594, 0.0044761479967535267033, -0.13405338016282686286, 0.049965532002184398497, 0.048763835001040811701, -0.050795157665751294873, 0.066932538639891819843, 0.12590629103302261593}, { /* b */ 0, 0.58045527243727446098, 0.11532640933909973913, -0.070294737643389337833, 0.181548564083585523, -0.018736087559288044924, -0.40284097321803180591, 0.14967265663310205803, 0.13808262017332012528, -0.14681980457335874757, 0.095308802128581115998, -0.090946576570358900193, -0.070282983278130428673, 0.16869505144689184162, -0.0056995287795943982978, -0.11145719903146375507, 0.010645899981859968664, -0.029949005576172804677, 0.020448635869082382177, 0.062096271982760298247, -0.061559281084502120995, -0.010155868739088885766, 0.022991411353021073971, 0.032517242832784398754, 0.053763405399084168712, -0.044022531706967849008, -0.056791172460615713113, -0.010048509774783498383, -0.011135553684340354641, 0.012392231463938252478, -0.028022778311032753296}, }, { /* right */ { /* a */ 0.0018361282853110241775, -0.0033872857336473410905, 0.0046059858721698987427, -0.0065776919334296218844, 0.0083542195671026941994, -0.011143260589185560033, 0.014031371980195189719, -0.015337968677412404384, 0.21316430420635706922, 0.18207602262459615661, -0.41531887067146328052, -0.031187790338876170138, 0.29269849220073268503, -0.054235962098389371711, -0.042109054573871707028, 0.3423878607439811983, 0.16665370514435465243, -0.12828009228750011927, 0.26039154286775512137, 0.25358554767330221402, -0.13060052607320907225, -0.16234915440849845281, -0.060712808823515200529, -0.11670474881265904821, -0.13121958987003162767, -0.11982151889132144906, -0.18541725949783305349, -0.10845374594194448492, -0.032077652783813255521, -0.071363329167328279357, -0.023880378233289735468}, { /* b */ 0, 0.063936342454143688108, -0.009966133409831066936, 0.11085760377685827116, 0.044677819807104057759, -0.034361268819236949479, 0.062743239678210147026, 0.062943407025382550057, 0.083058071853022163999, 0.13134064665964562124, -0.009268611908543576694, 0.065924378272914974097, 0.031868980523838338903, 4.2139580657379909672e-05, 0.069306867166024632709, 0.015998377618240203213, 0.023748490644913237968, 0.040251817749930099422, 0.012188030292016073519, -0.042057852935031489472, -0.0057086301428208377495, -0.043725723377226709265, -0.041252225482777717114, 0.02142720307404984148, -0.048367296921177430069, 0.032738401870443196995, 0.011597842342267461468, -0.0043165727307750041686, 0.014759019374048845674, -0.012598826880840656092, 0.0059455537992827295346}, }, }, { /* 145 deg */ { /* left */ { /* a */ 2.3996799380029271154e-05, -3.6983924603382553609e-05, -0.00010885427087492863252, 9.4027203384472457515e-06, 2.4325316760817870956e-06, 0.00013631801319691230442, 0.0003569147487281192771, -0.00021825674274833503706, 0.00049352887651621379916, -0.00034778795489354185147, 0.00010764262883821917806, -0.00013369431908771822748, 0.0001612257009148132796, -0.00082230832962326520785, 0.00098596277656181480209, -0.00076071996507610234461, 0.00048347716170849507067, 0.00024596005544775048635, 0.001122381176055228108, -0.0020218050363063327229, 0.0057335193050928046077, 0.00098351229257942485162, 0.07911624124667948621, 0.046474585830846848467, -0.10163739703000773673, -0.0031500376619642000975, 0.02685673447709591502, -0.0098010597263803456158, 0.019079556105860977222, 0.13571862275116308716, 0.16518685852055792207}, { /* b */ 0, 0.29209289431744722698, -0.088683859083907301546, 0.19870288442330741319, 0.056117942729694281212, 0.0055233992313913349292, -0.034417842552231237008, -0.18642029961095374357, 0.03188050946213716319, -0.12215473870355597619, 0.058564694857057841837, 0.027133066872742084286, -0.098321742115492494207, 0.10165847932147586974, -0.036326745038034458091, -0.081706909303494446029, 0.05666085919578400798, -0.065230034060614894287, -0.023126302295464751246, 0.034088858653635867313, -0.054637137087559795035, -0.0062919689342716411673, 0.00337558118006231608, 0.0067879138795912119519, 0.032772559692278990795, 0.064759985108769901885, -0.015975298047754549202, -0.027683987494919737316, -0.037109281432953777902, -0.033246283187224334732, -0.0065407641535591941329}, }, { /* right */ { /* a */ -5.9295322625916386996e-05, 0.00025361030688269420308, -0.0014975462105494886413, 0.0023321644056564800468, -0.0040143723665109903864, 0.0056496033224969280373, -0.0083177157733822781882, 0.010418731344547307871, 0.0037317150503252466062, 0.25774726845881812398, 0.03548555282497853347, -0.37577294565440211294, 0.13177411199254401852, 0.18278456868343551101, -0.13825278210365615772, 0.072251944089277819749, 0.37727001604717619321, 0.061230184483984304022, -0.046667811543061286927, 0.29825638920078673122, 0.11633725609713846394, -0.14742657162931566139, -0.078501906429860102143, -0.054583903007854664424, -0.14088563291174288628, -0.12188196573843396164, -0.16632804680378696083, -0.16103868772087179262, -0.062667853368376519319, -0.090920878374582722592, -0.067120396724383718512}, { /* b */ 0, 0.058538717682757313021, -0.0067235800765147457625, 0.10061999071942813455, 0.032009963128213844707, -0.0085750658654045221196, 0.0016715560854918543043, 0.051641640912733315083, 0.08213774559567066369, 0.14615828567515251613, 0.069892761402653755254, 0.03775384784469610483, 0.035962486104601509851, -0.0038619656431799556651, 0.07389376333252321849, -0.016166609451647752371, 0.048384225398525639028, 0.041847242283617011593, -0.0053303041007467626133, -0.03351417438249727071, -0.025366513586497739519, -0.0029940071307734909128, -0.035054287279749976602, 0.020758025097121490798, -0.060317252944543611748, 0.034924170228588589937, -0.010758538361728933047, 0.019019207899853916854, -0.0063627382651402011882, 0.0041195717837743143705, -0.0023809626018564782057}, }, }, { /* 150 deg */ { /* left */ { /* a */ -5.7808969703442882049e-06, 7.859375997232387963e-05, -0.00020195202801720404245, 0.00031595442082088791985, -0.00038697247538299443803, 0.00034207817356524117258, -0.00014974415749047315853, -0.00011228781855721113939, 0.0001483494695142529012, -7.6482351424324215156e-05, -0.00039344251322182000052, 0.00074616616850542438755, -0.00077416060895174783341, 0.00073700183421399230455, -0.00013666060560968244786, 0.00021771677245763058905, -0.00032895946806832474657, 0.0019676944930380199997, -0.002446887221799197952, 0.004275371799714045018, 0.0014554996183996360415, 0.077215344536710195378, 0.093552337016925002366, -0.077496570637172745855, -0.054258581771438052499, 0.015401699340680807815, 0.0022501846647787751218, 0.019689311409679107617, 0.14642282391945371511, 0.23487005904862523487, 0.086820381211688557599}, { /* b */ 0, -0.033799469500717105319, -0.096279236524443589929, 0.22091500173217204495, 0.12148875439946250909, -0.0076572573475680583144, -0.030131378491796145802, -0.14024308381335726104, -0.11888930525678909067, -0.099487028630620977232, 0.022130821356672325528, -0.0073011246190524126121, -0.024081928838987076702, 0.039823506357977711545, -0.040895948917110680476, -0.04829093947618379179, 0.022019905220257984801, -0.074358003629357294351, -0.0014864981615070327337, -0.015010722241373675168, -0.078612975309214072617, 0.019454143961178393951, -0.038257495985904999003, -0.017326638979547892561, 0.036913624998496930019, 0.03219274391251525369, 0.0068989239107586364241, 0.046842982808978361753, -0.060166361891406117124, 0.0039340002654791907111, -0.04171936477739834892}, }, { /* right */ { /* a */ -0.00074478344217444522601, 0.0007511785498183834453, -0.00095975582467544540664, 0.0003837616212743652196, 2.7485100289465424443e-05, -0.0013624965539919126067, 0.0023531580862221406977, -0.0042316079678110102291, 0.004840207769030158147, 0.031003830564175528794, 0.25958893247698433537, -0.084294597014668987134, -0.26906499788472909573, 0.1985279390908638586, 0.031028247903159594107, -0.11486513800822001352, 0.15741827212653530799, 0.34498012878014588933, 0.025665866484748771359, 0.018993532817268739266, 0.24502951514964954605, 0.0052309987987704175891, -0.12440272003277369484, -0.038543594725226788811, -0.06620071414478256866, -0.13099098239792078546, -0.13456166221842535968, -0.19553646171913985352, -0.097051768685255085378, -0.057685786296096837333, -0.10554790331524466218}, { /* b */ 0, 0.10296905720001520157, -0.031916632292636540336, 0.1371772093303840756, 0.025581835101807365307, 0.0037329793989293587157, 0.017041252381062854671, 0.0096940844390236771688, 0.083133380807689172265, 0.15137376358411169797, 0.08291163369970458441, 0.04345817582482400937, 0.032173172324003081191, 0.018586719340587219695, 0.028174870867589581203, -0.060814479048063550815, 0.047343284532777578366, 0.090803696340692977018, -0.024400418685635583138, 0.01192035672426071044, -0.076481246590415954967, -0.0051987080044437958271, -0.030485298389941462016, 0.01697330043399884747, -0.014962470605548762459, 0.029782567270843045282, -0.02811451573473626106, 0.015568336049018999256, -0.019634447613083035045, 0.018551872579303414768, -0.0031451728171741702433}, }, }, { /* 155 deg */ { /* left */ { /* a */ -7.846684997090895401e-06, -1.1967299512471996081e-05, 1.7571946397955742758e-05, 2.3839611326683177173e-05, -9.8824770589072309798e-06, 0.00012370376389902930999, -0.0001906069247575863275, 3.6766283073585981356e-05, 9.5089872087506020857e-05, -0.00012925669250207598437, 0.00029605806355082007336, -0.00021290917223693115595, 0.00046180190858835512557, -0.00039533474840980353804, 0.0008719665658268871411, -0.0011835970670920365616, 0.0020615578255611666236, -0.0020408909146701903481, 0.0033778563048036955654, 0.00052249169449347654393, 0.075086891007103417905, 0.10799162756168489974, -0.090613576457787559093, -0.086873763159647787724, 0.027096272833398993285, 0.021638942594090493365, 0.015445631834157258488, 0.1481240784572540603, 0.25527186229550025143, 0.056256086679792871585, -0.054761228196753553021}, { /* b */ 0, 0.015162328826992532704, 0.051460910327205677817, 0.25159007800437671598, 0.089044318617378936942, -0.071396716489688372143, -0.027379932088927860789, -0.13151821887623371676, -0.12205488260252916888, -0.034882323086196653783, -0.023718234665251469728, 0.031729017745465992739, -0.0024102467378883662974, -0.0018285683795610241376, -0.0028123056431544890543, -0.070871822570248155237, 0.010888903779204817113, -0.02650154579134089694, -0.0091602423032965951677, -0.022468559707222723887, -0.075005627228411086982, 0.011826150009136560115, -0.032163875408469655426, 0.0060877235611572766416, 0.0060017553941277279606, 0.0012837575007196289079, 0.0098048556126939523381, 0.017781482509124372365, -0.027803873140497255972, 0.016507726800299438175, -0.027745125743341980673}, }, { /* right */ { /* a */ 0.00075439313840242397391, -0.0009466484373081228941, 0.001117362672074795121, -0.0014999605847621955319, 0.0016130037250750729055, -0.0010427407160298850231, 0.00018687770332505987403, -0.00077652318897052118908, -0.00090588186742266568752, 0.0015874841468015831597, 0.056834941265862526372, 0.24021804398403312497, -0.13156983644280922929, -0.18774733377208435714, 0.15910464303583024548, -0.029387909936760131524, -0.066336326890658964262, 0.17600750420838770505, 0.31933440250999356458, 0.058621487908495764629, 0.053661208389622384873, 0.15542385504150191267, -0.078959879496191764936, -0.074108004601744492668, -0.0063690900763265986817, -0.17126990566013439166, -0.14328044992083904807, -0.099481795226936550747, -0.15814941178761987572, -0.10715729861463489658, -0.05079474350469341537}, { /* b */ 0, 0.041837716966783983219, 0.043280733016035598248, 0.1618483912770071198, 0.047340245106636258399, 0.0031153111105684458404, 0.05045513278414959224, 0.056800988297829903273, 0.083928671198514714913, 0.091601980773403729463, 0.014031960039830905507, 0.15350077616926702251, 0.012928372237460199548, -0.083614777794745298589, 0.02619391224583256933, -0.035909758683057992068, 0.13051397315322144088, -0.016959957605281961168, 0.014304710495411342153, 0.0039130715491280873564, -0.054039861922456668142, -0.036287732663882986406, -0.078426592983126514058, 0.056537939498906356062, 0.031549020181593882828, 0.039827905272487272581, -0.038563172179047200405, -0.021165137341089962364, -0.025250491764430491037, 0.036724720661475938888, 0.0033189175586024327602}, }, }, { /* 160 deg */ { /* left */ { /* a */ -3.7149558527515245954e-05, 4.1919578780416459629e-05, -5.8159129318057683003e-05, 0.00011254862958276544514, -7.3107186415732666393e-05, 6.5512044955529091794e-05, -7.4440959507706197518e-05, 0.00013568662041163210424, -0.00010189252337700028736, 0.00033243663814797042022, -0.000401587946230464116, 0.00067368910020015838544, -0.00083517900248408728434, 0.0011976710675293275946, -0.0013152957472478687961, 0.0021443953957672734489, -0.0018815142202588393087, 0.0037106122421914911058, -0.00017044498791529661633, 0.073961320379498096678, 0.12068648584967478499, -0.085907113320793371258, -0.073179540880097260214, 0.039265139187560915701, -0.00064392313717242903592, 0.0031548102298606384153, 0.16699928175344103121, 0.27331661117895034163, 0.055941628567326984189, -0.00013439361352951534464, 0.063545655250157873084}, { /* b */ 0, 0.077243387544764785524, -0.062916283022906860367, 0.07204284067405253289, 0.091071494507100059224, -0.063047357928280867156, -0.0051944896203165447091, -0.110764290783549324, -0.10636944939058923243, -0.049625576369546897659, -0.064948907208470241237, 0.013479571139007884284, -0.040799955185258363066, 0.024249363108699850677, -0.013429698593608874191, -0.058369924720511057181, -0.0036411935396690742195, -0.03473734107251047476, -0.0089189182392312993386, -0.028110515997228913143, -0.063925976663548045309, -0.012325351390687910857, -0.035356944142472812587, -0.013074194403078776006, -0.0054812757612626716863, -0.0065053700493838961805, 0.0022551694686678835922, -0.012557569879015349421, -0.014525072829715823808, -0.022243763452348130905, 0.014447532142719543558}, }, { /* right */ { /* a */ -0.00044383087323665549543, 0.00075264275358963295126, -0.0011084317211133842829, 0.0015064296893978550932, -0.001913399413399143132, 0.0020827856229543167954, -0.00262639912518378843, 0.0020921307683496870311, -0.0025292965287471158575, 0.0027619283838892921823, -0.0027051536817968725029, 0.074579262764962267473, 0.20716610339513352734, -0.15270625867165765754, -0.11899492661092578305, 0.11041565204819833723, -0.066124249006130147999, -0.028881576291817784297, 0.20122834414620333066, 0.29345582399218328451, 0.046628516668419800473, 0.062649396769284729225, 0.080578444427042511533, -0.096966963434950134704, -0.034589843090214629495, -0.044983954419234792321, -0.19708491210074569056, -0.12473633591782173902, -0.075757846912942697348, -0.13561377678227309884, -0.070620516137197747453}, { /* b */ 0, 0.076700172241986136479, 0.097031324089486045703, 0.12607736701479729802, 0.054803947831198004947, 0.056108645304260573727, 0.031710589549764807427, 0.071202750919399010465, 0.11568453878672926849, 0.0081356648562588493312, 0.025496606300130612854, 0.13118928657870976284, -0.0039962511106262504912, -0.10255093474432377953, 0.017731740670247349984, 0.05153480708222722001, 0.086564962476945131464, -0.0029973253242322056566, -0.027265078521871571882, -0.028460734340868612535, -0.03770221949125473343, 0.0030526263578587176095, -0.049991694319084956089, 0.038639510098717640141, 0.0075666518905073698598, 0.034827489302385362946, -0.0081345578607739943422, -0.0078819762681881996857, -0.031609262095906760781, 0.012555574735251609497, 0.0037631991324808475308}, }, }, { /* 165 deg */ { /* left */ { /* a */ 1.6032358884032509494e-05, -2.0618572127428181555e-05, 7.6373596474832493395e-05, -1.3536907012001353945e-05, 3.4933854420335863443e-06, 1.6362994709193858786e-05, 0.00020972907258109840952, -2.5256253477489408465e-05, 0.00039309818927746298899, -0.00027020741019678816766, 0.0008771638958238181516, -0.00079800995589351941817, 0.0014095308371875328243, -0.00099036352715908696279, 0.0021987588748328948038, -0.0012523736038494441732, 0.0036145935512765792197, 0.00026645679829240243551, 0.073071940605157204018, 0.13836674623374234372, -0.077092070428358416834, -0.09434908569569411263, 0.057399978942024310058, 0.028636249922858736383, -0.021592044304602486804, 0.15781165319680989789, 0.31786629420146872427, 0.064473943994503013499, -0.0062786139784498616601, 0.12491529823840941127, 0.061071277870083928718}, { /* b */ 0, 0.027214061265740108198, -0.0086497991384770767098, -3.2940689898009319026e-05, -0.075158699224670000305, -0.055577653949451244486, -0.0047999396921016845852, -0.08780777413688878319, -0.080424568475456759131, -0.060754304003485248842, -0.072840781644434304809, -0.018781093659853143052, -0.051867299993568760641, -0.024221852314987302179, 0.024312080425248350224, -0.06347898491576575708, -0.021541957671705747046, -0.025194329854871799768, -0.030851700042189289519, -0.02876187536651752738, -0.051425569297935957991, -0.025301806133859461312, -0.060655013523758238847, 0.0016406946004576816733, -0.035637107960312386368, 0.0017071477050045746893, -0.0080116049747114212454, -0.041229325803970866271, -0.031203173601196398934, -0.010422760565592659177, -0.013613842045900881317}, }, { /* right */ { /* a */ 0.00024507018937369750601, -0.00036103168107003104012, 0.00062721293653169446491, -0.00099399394534738227946, 0.0015420607719094162058, -0.0022155908981774663502, 0.0021943216735754306201, -0.0030760841178596731726, 0.0032577844373072109563, -0.0036687244225159718058, 0.0043774992430477971395, -0.0046297866164099477082, 0.084871246778502398844, 0.17731062929576502096, -0.1375195862328166263, -0.085910592216953435285, 0.042853910962566479914, -0.054304062404994177249, 0.0029573622616291647854, 0.17139734238236412067, 0.30171044478694875046, 0.076820024231594938313, 0.0069952166036318236264, 0.053998326361680282215, -0.042834848103449722767, -0.068257583462445384215, -0.12962925817370279935, -0.16877151750987853807, -0.096130845080358684474, -0.11173355687788871782, -0.084937499051003145789}, { /* b */ 0, 0.10156275271398867988, 0.077185566288041296268, 0.13282149838280954413, 0.08171816697032448229, 0.065019220953049655654, 0.10019105873802339191, 0.072012868194281015599, 0.055492568684905457799, 0.064212004771331043784, 0.010854841299193750126, 0.014918743122863641071, -0.045033301591780941497, -0.031706095040356062353, 0.089564090825565129128, 0.022024871724492765812, 0.070052222587587240077, -0.030671518055237073641, -0.031950765902958457032, -0.0033956392862712764247, -0.055116051972375207368, 0.020522665861114758323, -0.053010372439558396673, 0.039559117300537981199, 0.008336639543545999731, 0.031089458806289597959, 0.0058377015975212484533, -0.0083504315081823349276, -0.015804329272896613934, -0.010019162080842670959, 0.0015402341953458034696}, }, }, { /* 170 deg */ { /* left */ { /* a */ 3.1302173760794381822e-06, 9.0499071014882737779e-05, 4.1432883721159718959e-05, 9.3300330586410179859e-05, 3.0958006921876900924e-05, 0.00030591771116306133368, 3.4937743809137188078e-05, 0.0005286897953454814704, -7.7097293896266627655e-05, 0.0010526264265092732941, -0.00059039595483312257672, 0.0016554385683792412036, -0.00081576048305276229605, 0.0024720344257711523994, -0.0010712973259885414171, 0.0038707551676397940026, 0.00035560747645158063447, 0.073630880141617449652, 0.14661407056075492772, -0.078085169269020981986, -0.1085137050343965015, 0.047500582381204692339, 0.017874880158738615243, -0.02261152729082782642, 0.17893430052470793434, 0.34360192665262856426, 0.053606962467575569597, -0.026329075153777581342, 0.11186902796209152733, 0.01673664825244114418, -0.032569655570580113846}, { /* b */ 0, 0.053914155213885539553, 0.015830023390450698173, 0.020072501148854504649, 0.012655482483289737239, 0.020659117037705176934, -0.036430595746206329011, -0.092725103952862042433, -0.087702484986157402957, -0.071331118872211551896, -0.055194423238813516974, 0.0030397885680127911812, -0.037054498365218790923, -0.00066159090580941715132, 0.03453582545144551208, -0.079728062440387326149, -0.016901163871901880853, -0.031621694144279288707, -0.010376069900994155937, -0.020804253498749036844, -0.062761266384006586527, -0.03055738570310884139, -0.034919971965419183135, 0.0067210583352961261738, -0.018044902997532696887, -0.012390824741873029957, -0.034925941218427729307, 0.0019679796761651324744, -0.046916920430073449921, -0.001926393056322917019, -0.043422184307362332589}, }, { /* right */ { /* a */ -0.00012554898192080455157, 0.00017247319621539056113, -0.00052640243619356957838, 0.00078473489119584155516, -0.0010021108972691795957, 0.0013892594930291386757, -0.0019935503377168503278, 0.0019212312861796600715, -0.0028198965807725573374, 0.0034947162689657335077, -0.0040898955417896856734, 0.0051162537699099217003, -0.004885681522894154416, 0.08688474323844917746, 0.15813922660799484277, -0.11585092003650954151, -0.095210034436674195746, 0.0056687868211797304285, -0.027443531844821480309, 0.004389007744525982857, 0.16430947455392352907, 0.31363566378326407369, 0.056519924958118465674, -0.014416914733167852242, 0.059496911787165755736, -0.067927300887186875533, -0.10596882274465810325, -0.14491118769143784828, -0.16207943488078788152, -0.10543191067505575109, -0.061618897190486243698}, { /* b */ 0, 0.12235116841116192021, 0.085685636739992132593, 0.15071367068084445817, 0.11999752191271674528, 0.096732633326932923601, 0.097546664174340963482, 0.044232293409446080124, 0.1363900499191263993, 0.017644008448738056349, -0.14868778347587457977, 0.045368560833557475265, -0.046122428467992582224, 0.01830430837505836808, 0.13364735242459227504, 0.014238310704218614527, 0.036885293430335579223, -0.087165827746189125658, -0.0012216042663201753804, -0.0089679957372733667964, -0.014654928771533435455, -0.0018582758058304105903, -0.053026415433481702277, 0.032246281499307472007, 0.023017491024904506575, 0.039495641088039872002, -0.0061943089637748680043, 0.0029509240232947725295, -0.047081833601529801681, 0.026892462378347564006, -0.011464508826155780929}, }, }, { /* 175 deg */ { /* left */ { /* a */ 0.00014791617587631145092, 0.000285910551379997492, 0.00012692619729554049804, 0.00040438895197725276999, 0.00029066876152533671629, 0.00016507225739092941949, 0.00040071421306131515833, 0.00027735693519659234546, 0.00081157671666387543041, -0.00048502720052107117267, 0.0016187447863386097632, -0.00064023663697010402274, 0.0026127689616017857333, -0.001428850716564400436, 0.0036199114237731029424, -0.00021464509485785707231, 0.075591000634582516948, 0.14738894320017598139, -0.090538848975703356547, -0.13055765949530895309, 0.032117835465639288373, 0.016143228745123250345, -0.038226437773861143832, 0.17392064687423575142, 0.37274723141852289521, 0.040910440487311454383, -0.08476188187521438433, 0.062153593309993704352, -0.044583141086268485154, -0.12590025666951026873, -0.067260170498982529974}, { /* b */ 0, 0.11842983119354777433, 0.099103374896943041694, 0.12024966287153826539, 0.063220438431613179553, 0.14988272645351241597, 0.07228893489249349491, -0.10464217060759950506, -0.082634139336214273985, -0.10798282870583958415, -0.043442174670269007031, 0.039613032465045383557, 0.022400956780355141262, 0.040843572178851650367, 0.038353247796031608718, -0.04998345091756367653, -0.049227045004901492931, 0.0015240723438836312198, 0.0055340797093517135607, -0.035845162634114136058, -0.04118472436785008961, -0.016152787545783975354, -0.015680433024141404719, 0.041462862682487000576, -0.042056545545322843171, 0.008567650860054343287, -0.00230326459824820029, 0.003062478046954308919, -0.045793547300658488108, -0.0049872007967452502974, -0.034906317380872797784}, }, { /* right */ { /* a */ -2.6286289642291852525e-06, -0.00017077534716653690935, 7.4272678877389209859e-05, -0.00013287330160411834831, 0.00040045161805264337107, -0.00056894292294095219487, 0.00088913424170587013716, -0.0015036768604738406322, 0.0015723919800491449432, -0.0020893795767270781361, 0.0025485069730176064529, -0.0033080076535896112133, 0.0042371007784964762055, -0.0032218224161424321994, 0.083844912285675393671, 0.1496127653714211525, -0.10289831272694256736, -0.12129415487574513044, 0.0028921886841243122854, -0.0016166957512390297755, -0.0042121147670812217681, 0.16185108144442361677, 0.31174473329193308491, 0.052425807425518416993, -0.040640843909603860395, 0.036208208063514615849, -0.0729609243242863581, -0.12242990870115746938, -0.13585684803994743652, -0.15817574423506386427, -0.085508421111451085594}, { /* b */ 0, 0.13055355297732951225, 0.12756246882044364188, 0.15909574579012766837, 0.1369194323142817471, 0.10740926008837287098, 0.049654510518590780355, 0.1251822474353236625, 0.10966935207374262085, -0.12088604357909142617, -0.085642514571738492801, 0.035567864082081318555, -0.032137217958537335483, 0.052516747987079649695, 0.11296002551350671494, 0.02020028482228879152, -0.0074679857903648533268, -0.047169535066008072555, -0.036124457824004196915, -0.0028072058675244863923, 0.015793363116794936069, -0.013593318103706682198, -0.052801939558321624169, 0.036735233879708145688, 0.018116300454979784862, 0.033374630253686560222, 0.012518645296619081847, -0.021356743399605047917, -0.026839107781398245656, 0.0027055497416701361317, 0.0080514686745915622912}, }, }, { /* 180 deg */ { /* left */ { /* a */ -3.7346135617535164419e-06, -8.984158843630088865e-05, -6.4019064466941996011e-05, 0.00017983139599295761544, -0.00036096701588926875717, 0.00041559948135705469634, -0.00073226175846888372917, 0.0010489358635856500107, -0.0014871849499012005681, 0.0015217921538472787765, -0.0020253943033149424124, 0.0024041410881373882769, -0.0027338250369914052218, 0.003546028232389620248, -0.0017319271452512392806, 0.078317721315781116398, 0.1456521503947636742, -0.10293337788602949234, -0.1375738668682491006, 0.0081216237324363959454, 0.013184690158497477941, -0.014014253666613232449, 0.14577791035449927382, 0.33195957443370960327, 0.054534511669034113623, -0.086101008923252425609, 0.0092129082075557977571, -0.084077471088312816239, -0.13684081102824682818, -0.15318119974974245268, -0.11230157584427044593}, { /* b */ 0, 0.1666384464706137658, 0.13608019535398821476, 0.20224660094906901642, 0.14926961513838893358, 0.073384972730091965754, 0.15686389072040762827, 0.096143170518754386689, -0.056347703479486407896, -0.1152601897366377498, -0.085029587197256589759, 0.060132780117322551239, 0.0069822793384761733942, 0.094093296548866611761, 0.081554016876462839813, -0.054404436604773884212, 0.021259701144760105584, -0.061703475341862205894, 0.012044605759416269347, -0.0013065382791313008559, -0.038045451921514553129, 0.00033388944627459234138, -0.0034356779476680393559, 0.021952832657257385918, 0.0026729239074668119901, 0.029827744301169373947, -0.0043862222358814935419, 0.0099212081615504717214, -0.020663956459189152665, -0.0088133274362810903879, 0.0044341780491049653107}, }, { /* right */ { /* a */ -3.7346135617535164419e-06, -8.984158843630088865e-05, -6.4019064466941996011e-05, 0.00017983139599295761544, -0.00036096701588926875717, 0.00041559948135705469634, -0.00073226175846888372917, 0.0010489358635856500107, -0.0014871849499012005681, 0.0015217921538472787765, -0.0020253943033149424124, 0.0024041410881373882769, -0.0027338250369914052218, 0.003546028232389620248, -0.0017319271452512392806, 0.078317721315781116398, 0.1456521503947636742, -0.10293337788602949234, -0.1375738668682491006, 0.0081216237324363959454, 0.013184690158497477941, -0.014014253666613232449, 0.14577791035449927382, 0.33195957443370960327, 0.054534511669034113623, -0.086101008923252425609, 0.0092129082075557977571, -0.084077471088312816239, -0.13684081102824682818, -0.15318119974974245268, -0.11230157584427044593}, { /* b */ 0, 0.1666384464706137658, 0.13608019535398821476, 0.20224660094906901642, 0.14926961513838893358, 0.073384972730091965754, 0.15686389072040762827, 0.096143170518754386689, -0.056347703479486407896, -0.1152601897366377498, -0.085029587197256589759, 0.060132780117322551239, 0.0069822793384761733942, 0.094093296548866611761, 0.081554016876462839813, -0.054404436604773884212, 0.021259701144760105584, -0.061703475341862205894, 0.012044605759416269347, -0.0013065382791313008559, -0.038045451921514553129, 0.00033388944627459234138, -0.0034356779476680393559, 0.021952832657257385918, 0.0026729239074668119901, 0.029827744301169373947, -0.0043862222358814935419, 0.0099212081615504717214, -0.020663956459189152665, -0.0088133274362810903879, 0.0044341780491049653107}, }, } }; #endif
119,937
C++
.h
342
347.51462
840
0.838001
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,137
basics.h
LMMS_lmms/plugins/LadspaEffect/caps/basics.h
/* basics.h Copyright 2004-9 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ common constants, typedefs, utility functions and simplified LADSPA #defines. */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. */ #ifndef _BASICS_H_ #define _BASICS_H_ #define _GNU_SOURCE 1 #define _USE_GNU 1 /* unlocking some standard math calls. */ #define __USE_ISOC99 1 #define __USE_ISOC9X 1 #define _ISOC99_SOURCE 1 #define _ISOC9X_SOURCE 1 #include <stdlib.h> #include <string.h> #ifndef _USE_MATH_DEFINES #define _USE_MATH_DEFINES #endif #include <math.h> #include <assert.h> #include <stdio.h> #include <stdint.h> #include <ladspa.h> /* reducing LADSPA_DEFINES_WITH_LOTS_OF_CHARACTERS_REALLY verbosity */ #define BOUNDED (LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE) #define INTEGER LADSPA_HINT_INTEGER #define LOG LADSPA_HINT_LOGARITHMIC #define TOGGLE LADSPA_HINT_TOGGLED #define DEFAULT_0 LADSPA_HINT_DEFAULT_0 #define DEFAULT_1 LADSPA_HINT_DEFAULT_1 #define DEFAULT_100 LADSPA_HINT_DEFAULT_100 #define DEFAULT_440 LADSPA_HINT_DEFAULT_440 #define DEFAULT_MIN LADSPA_HINT_DEFAULT_MINIMUM #define DEFAULT_LOW LADSPA_HINT_DEFAULT_LOW #define DEFAULT_MID LADSPA_HINT_DEFAULT_MIDDLE #define DEFAULT_HIGH LADSPA_HINT_DEFAULT_HIGH #define DEFAULT_MAX LADSPA_HINT_DEFAULT_MAXIMUM #define INPUT LADSPA_PORT_INPUT #define OUTPUT LADSPA_PORT_OUTPUT #define AUDIO LADSPA_PORT_AUDIO #define CONTROL LADSPA_PORT_CONTROL #define HARD_RT LADSPA_PROPERTY_HARD_RT_CAPABLE #define TEN_TO_THE_SIXTH 1000000 #define MIN_GAIN .000001 /* -120 dB */ /* smallest non-denormal 32 bit IEEE float is 1.18×10^-38 */ #define NOISE_FLOOR .00000000000005 /* -266 dB */ typedef int8_t int8; typedef uint8_t uint8; typedef int16_t int16; typedef uint16_t uint16; typedef int32_t int32; typedef uint32_t uint32; typedef int64_t int64; typedef uint64_t uint64; typedef struct { const char * name; LADSPA_PortDescriptor descriptor; LADSPA_PortRangeHint range; } PortInfo; typedef LADSPA_Data sample_t; typedef unsigned long ulong; /* flavours for sample store functions run() and run_adding() */ typedef void (*sample_func_t) (sample_t *, int, sample_t, sample_t); inline void store_func (sample_t * s, int i, sample_t x, sample_t gain) { s[i] = x; } inline void adding_func (sample_t * s, int i, sample_t x, sample_t gain) { s[i] += gain * x; } #ifndef max template <class X, class Y> X min (X x, Y y) { return x < y ? x : (X) y; } template <class X, class Y> X max (X x, Y y) { return x > y ? x : (X) y; } #endif /* ! max */ template <class T> T clamp (T value, T lower, T upper) { if (value < lower) return lower; if (value > upper) return upper; return value; } static inline float frandom() { return (float) rand() / (float) RAND_MAX; } /* NB: also true if 0 */ inline bool is_denormal (float & f) { int32 i = *((int32 *) &f); return ((i & 0x7f800000) == 0); } /* todo: not sure if this double version is correct, actually ... */ inline bool is_denormal (double & f) { int64 i = *((int64 *) &f); return ((i & 0x7fe0000000000000ll) == 0); } #ifdef __i386__ #define TRAP asm ("int $3;") #else #define TRAP #endif /* //////////////////////////////////////////////////////////////////////// */ #define CAPS "C* " class Plugin { public: double fs; /* sample rate */ double adding_gain; /* for run_adding() */ int first_run; /* 1st block after activate(), do no parameter smoothing */ sample_t normal; /* renormal constant */ sample_t ** ports; LADSPA_PortRangeHint * ranges; /* for getport() below */ public: /* get port value, mapping inf or nan to 0 */ inline sample_t getport_unclamped (int i) { sample_t v = *ports[i]; return (isinf (v) || isnan(v)) ? 0 : v; } /* get port value and clamp to port range */ inline sample_t getport (int i) { LADSPA_PortRangeHint & r = ranges[i]; sample_t v = getport_unclamped (i); return clamp (v, r.LowerBound, r.UpperBound); } }; #endif /* _BASICS_H_ */
4,690
C++
.h
159
27.622642
78
0.717566
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,138
Reverb.h
LMMS_lmms/plugins/LadspaEffect/caps/Reverb.h
/* Reverb.h Copyright 2002-5 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ two reverb units: JVRev and Plate. the former is a rewrite of STK's JVRev, a traditional design. original comment: This is based on some of the famous Stanford CCRMA reverbs (NRev, KipRev) all based on the Chowning/Moorer/ Schroeder reverberators, which use networks of simple allpass and comb delay filters. (STK is an effort of Gary Scavone). the algorithm is mostly unchanged in this implementation; the delay line lengths have been fiddled with to make the stereo field more evenly weighted, and denormal protection has been added. the Plate reverb is based on the circuit discussed in Jon Dattorro's september 1997 JAES paper on effect design (part 1: reverb & filters). */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. */ #ifndef _REVERB_H_ #define _REVERB_H_ #include <stdio.h> #include "dsp/Delay.h" #include "dsp/OnePole.h" #include "dsp/Sine.h" #include "dsp/util.h" /* both reverbs use this */ class Lattice : public DSP::Delay { public: inline sample_t process (sample_t x, double d) { sample_t y = get(); x -= d * y; put (x); return d * x + y; } }; /* helper for JVRev */ class JVComb : public DSP::Delay { public: float c; inline sample_t process (sample_t x) { x += c * get(); put (x); return x; } }; class JVRev : public Plugin { public: static int default_length[9]; sample_t t60; Lattice allpass [3]; JVComb comb[4]; DSP::Delay left, right; double apc; template <sample_func_t F> void one_cycle (int frames); int length [9]; void set_t60 (sample_t t); public: static PortInfo port_info []; void init(); void activate(); void run (int n) { one_cycle<store_func> (n); } void run_adding (int n) { one_cycle<adding_func> (n); } }; /* /////////////////////////////////////////////////////////////////////// */ class ModLattice { public: float n0, width; DSP::Delay delay; DSP::Sine lfo; DSP::DelayTapA tap; void init (int n, int w) { n0 = n; width = w; delay.init (n + w); } void reset() { delay.reset(); tap.reset(); } inline sample_t process (sample_t x, double d) { /* TODO: try all-pass interpolation */ sample_t y = delay.get_at (n0 + width * lfo.get()); x += d * y; delay.put (x); return y - d * x; /* note sign */ } }; class PlateStub : public Plugin { public: sample_t f_lfo; sample_t indiff1, indiff2, dediff1, dediff2; struct { DSP::OnePoleLP bandwidth; Lattice lattice[4]; } input; struct { ModLattice mlattice[2]; Lattice lattice[2]; DSP::Delay delay[4]; DSP::OnePoleLP damping[2]; int taps[12]; } tank; public: void init(); void activate() { input.bandwidth.reset(); for (int i = 0; i < 4; ++i) { input.lattice[i].reset(); tank.delay[i].reset(); } for (int i = 0; i < 2; ++i) { tank.mlattice[i].reset(); tank.lattice[i].reset(); tank.damping[i].reset(); } tank.mlattice[0].lfo.set_f (1.2, fs, 0); tank.mlattice[1].lfo.set_f (1.2, fs, .5 * M_PI); } inline void process (sample_t x, sample_t decay, sample_t * xl, sample_t * xr); }; /* /////////////////////////////////////////////////////////////////////// */ class Plate : public PlateStub { public: template <sample_func_t F> void one_cycle (int frames); public: static PortInfo port_info []; void run (int n) { one_cycle<store_func> (n); } void run_adding (int n) { one_cycle<adding_func> (n); } }; /* /////////////////////////////////////////////////////////////////////// */ class Plate2x2 : public PlateStub { public: template <sample_func_t F> void one_cycle (int frames); public: static PortInfo port_info []; void run (int n) { one_cycle<store_func> (n); } void run_adding (int n) { one_cycle<adding_func> (n); } }; #endif /* _REVERB_H_ */
4,782
C++
.h
201
20.303483
77
0.63297
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,139
HRTF.h
LMMS_lmms/plugins/LadspaEffect/caps/HRTF.h
/* HRTF.h Copyright 2002-5 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ IIR filtering based on HRTF data sets */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. */ #ifndef _HRTF_H_ #define _HRTF_H_ #include "dsp/util.h" class HRTF : public Plugin { public: int pan; int n, h; double x[32]; struct { double * a, * b; double y[32]; } left, right; void set_pan (int p); template <sample_func_t F> void one_cycle (int frames); public: static PortInfo port_info []; void init(); void activate() { set_pan ((int) *ports[1]); } void run (int n) { one_cycle<store_func> (n); } void run_adding (int n) { one_cycle<adding_func> (n); } }; #endif /* _HRTF_H_ */
1,438
C++
.h
54
23.666667
66
0.712813
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,140
Descriptor.h
LMMS_lmms/plugins/LadspaEffect/caps/Descriptor.h
/* Descriptor.h Copyright 2004-10 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ Creating a LADSPA_Descriptor for a CAPS plugin via a C++ template, saving a virtual function call compared to the usual method used for C++ plugins in a C context. Descriptor<P> expects P to declare some common methods, like init(), activate() etc, plus a static port_info[] and LADSPA_Data * ports[] and adding_gain. (P should derive from Plugin, too.) */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. */ #ifndef _DESCRIPTOR_H_ #define _DESCRIPTOR_H_ #ifdef __SSE__ #include <xmmintrin.h> #endif #ifdef __SSE3__ #include <pmmintrin.h> #endif /* common stub for Descriptor makes it possible to delete() without special- * casing for every plugin class. */ class DescriptorStub : public LADSPA_Descriptor { public: DescriptorStub() { PortCount = 0; } virtual ~DescriptorStub() { if (PortCount) { delete [] PortNames; delete [] PortDescriptors; delete [] PortRangeHints; } } }; inline void processor_specific_denormal_measures() { #ifdef __SSE3__ /* this one works reliably on a 6600 Core2 */ _MM_SET_DENORMALS_ZERO_MODE (_MM_DENORMALS_ZERO_ON); #endif #ifdef __SSE__ /* this one doesn't ... */ _MM_SET_FLUSH_ZERO_MODE (_MM_FLUSH_ZERO_ON); #endif } template <class T> class Descriptor : public DescriptorStub { public: LADSPA_PortRangeHint * ranges; public: Descriptor() { setup(); } ~Descriptor() override = default; void setup(); void autogen() { PortCount = (sizeof (T::port_info) / sizeof (PortInfo)); /* unroll PortInfo members */ const char ** names = new const char * [PortCount]; LADSPA_PortDescriptor * desc = new LADSPA_PortDescriptor [PortCount]; ranges = new LADSPA_PortRangeHint [PortCount]; /* could also assign directly but const_cast is ugly. */ for (int i = 0; i < (int) PortCount; ++i) { names[i] = T::port_info[i].name; desc[i] = T::port_info[i].descriptor; ranges[i] = T::port_info[i].range; } PortNames = names; PortDescriptors = desc; PortRangeHints = ranges; /* LADSPA_Descriptor vtable entries */ instantiate = _instantiate; connect_port = _connect_port; activate = _activate; run = _run; run_adding = _run_adding; set_run_adding_gain = _set_run_adding_gain; deactivate = 0; cleanup = _cleanup; } static LADSPA_Handle _instantiate ( const struct _LADSPA_Descriptor * d, ulong fs) { T * plugin = new T(); int n = (int) d->PortCount; LADSPA_PortRangeHint * ranges = ((Descriptor *) d)->ranges; plugin->ranges = ranges; plugin->ports = new sample_t * [n]; /* connect to lower bound as a safety measure */ for (int i = 0; i < n; ++i) plugin->ports[i] = &(ranges[i].LowerBound); plugin->fs = fs; plugin->normal = NOISE_FLOOR; plugin->init(); return plugin; } static void _connect_port (LADSPA_Handle h, ulong i, LADSPA_Data * p) { ((T *) h)->ports[i] = p; } static void _activate (LADSPA_Handle h) { T * plugin = (T *) h; plugin->first_run = 1; /* since none of the plugins do any RT-critical work in * activate(), it's safe to defer the actual call to the * plugin's activate() method for the first run() after * the host called in here. * * It's the simplest way to prevent a parameter smoothing sweep * in the first audio block after activation. plugin->activate(); */ } static void _run (LADSPA_Handle h, ulong n) { T * plugin = (T *) h; /* We don't reset the processor flags later, it's true. */ processor_specific_denormal_measures(); /* If this is the first audio block after activation, * initialize the plugin from the current set of parameters. */ if (plugin->first_run) { plugin->activate(); plugin->first_run = 0; } plugin->run (n); plugin->normal = -plugin->normal; } static void _run_adding (LADSPA_Handle h, ulong n) { T * plugin = (T *) h; /* We don't reset the processor flags later, it's true. */ processor_specific_denormal_measures(); /* If this is the first audio block after activation, * initialize the plugin from the current set of parameters. */ if (plugin->first_run) { plugin->activate(); plugin->first_run = 0; } plugin->run_adding (n); plugin->normal = -plugin->normal; } static void _set_run_adding_gain (LADSPA_Handle h, LADSPA_Data g) { T * plugin = (T *) h; plugin->adding_gain = g; } static void _cleanup (LADSPA_Handle h) { T * plugin = (T *) h; delete [] plugin->ports; delete plugin; } }; #endif /* _DESCRIPTOR_H_ */
5,485
C++
.h
180
26.422222
76
0.668127
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,141
VCO.h
LMMS_lmms/plugins/LadspaEffect/caps/dsp/VCO.h
/* dsp/VCO.h Copyright 2004, 2010 Tim Goetze <tim@quitte.de> oscillators for triangle/sawtooth/square waves, and a combination for detuning and hard sync. NB: these oscillators are *not* bandlimited. oversample if needed. */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. */ #ifndef _DSP_VCO_H_ #define _DSP_VCO_H_ namespace DSP { /* variable triangle to sawtooth generator. you can use two of these to * generate a square, but we prefer the integrated solution below. */ class TriSaw { public: /* doubles for maximum stability */ double phase, inc; double tri, tri1, tri2; public: TriSaw() { phase = 0; tri = .5; } inline void set_f (double f, double fs) { set_inc (f / fs); } inline void set_inc (double i) { inc = i; } /* 0: triangle, 1: saw */ inline void set_saw (double t) { tri = .5 + .5 * t; tri1 = 2. / tri; tri2 = 2. / (1 - tri); } /* advance and return 1 sample. * many conditionals, but quicker than a solution based on fmod() */ inline float get() { phase += inc; /* the good thing is that tri is always > .5, which implies * that this first conditional is true more often than not. */ if (phase <= tri) return -1 + phase * tri1; if (phase < 1) return 1 - (phase - tri) * tri2; phase -= 1; return -1 + phase * tri1; } }; /* variable triangle to sawtooth to square generator */ class TriSawSquare { public: /* doubles for maximum stability, using floats here increases * cycle need on my athlon */ double phase, inc; double * sync; float sync_phase; /* using doubles here increases cycle need significantly */ float square_i; float tri, tri1, tri2; float st1, st2; public: TriSawSquare() { reset(); } void reset() { phase = 0; sync = &phase; sync_phase = 0; set_saw_square (.5, .5); } inline void set_f (double f, double fs) { set_inc (f / fs); } inline void set_inc (double i) { inc = i; } inline void set_sync (TriSawSquare & tss, float p) { sync = &tss.phase; sync_phase = p; } /* t = 0: tri - 1: saw, * s = 0: tri/saw - 1: square */ inline void set_saw_square (float t, float s) { tri = .5 + .5 * t; square_i = 1 - s; float si2 = 2 * square_i; float one_m_t = 1 - tri; tri1 = si2 / tri; tri2 = si2 / one_m_t; st1 = s * one_m_t; st2 = s * tri; } /* advance and return 1 sample. * many branching instructions but on this intel chip faster than * a version using floor() to keep the phase within [0..1]. */ inline float get() { phase += inc; if (phase <= tri) first_half: /* raw version: return (1 - square) * (-1 + phase * 2 / tri) - square * (1 - tri); */ return -square_i + phase * tri1 - st1; if (phase < 1) /* raw version: return (1 - square) * (1 - (phase - tri) * 2 / (1 - tri)) + square * tri; */ return square_i - (phase - tri) * tri2 + st2; phase -= 1; *sync = phase + sync_phase; goto first_half; } }; class VCO2 { public: TriSawSquare vco[2]; float blend, i_blend; public: VCO2() { set_blend (.5); } void reset() { set_blend (.5); vco[0].reset(); vco[1].reset(); } void set_f (double f, double fs, double detune) { vco[0].set_f (f, fs); vco[1].set_f (f * pow (2, detune / 12.), fs); } inline void set_blend (float b) { blend = b; i_blend = 1 - fabs (b); } inline void set_sync (float sync) { vco[0].set_sync (sync ? vco[1] : vco[0], sync); } inline float get() { return vco[0].get() * blend + vco[1].get() * i_blend; } }; } /* namespace DSP */ #endif /* _DSP_VCO_H_ */
4,519
C++
.h
182
20.851648
78
0.619415
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,142
SVF.h
LMMS_lmms/plugins/LadspaEffect/caps/dsp/SVF.h
/* dsp/SVF.h Copyright 2002-4 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ ladder filter in Chamberlin topology. supports largely independent f and Q adjustments and sweeps. */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. */ /* inspired by this music-dsp entry: State Variable Filter (Double Sampled, Stable) Type : 2 Pole Low, High, Band, Notch and Peaking References :Posted by Andrew Simper Notes : Thanks to Laurent de Soras for the stability limit and Steffan Diedrichsen for the correct notch output. Code : input = input buffer; output = output buffer; fs = sampling frequency; fc = cutoff frequency normally something like: 440.0*pow(2.0, (midi_note - 69.0)/12.0); res = resonance 0 to 1; drive = internal distortion 0 to 0.1 freq = MIN(0.25, 2.0*sin(PI*fc/(fs*2))); // the fs*2 is because it's double sampled damp = MIN(2.0*(1.0 - pow(res, 0.25)), MIN(2.0, 2.0/freq - freq*0.5)); notch = notch output low = low pass output high = high pass output band = band pass output peak = peaking output = low - high -- double sampled svf loop: for (i=0; i<numSamples; i++) { in = input[i]; notch = in - damp*band; low = low + freq*band; high = notch - low; band = freq*high + band - drive*band*band*band; out = 0.5*(notch or low or high or band or peak); notch = in - damp*band; low = low + freq*band; high = notch - low; band = freq*high + band - drive*band*band*band; out += 0.5*(same out as above); output[i] = out; } */ #ifndef _DSP_SVF_H_ #define _DSP_SVF_H_ namespace DSP { template <int OVERSAMPLE> class SVF { protected: /* loop parameters */ sample_t f, q, qnorm; /* outputs (peak and notch left out) */ sample_t lo, band, hi; sample_t * out; public: /* the type of filtering to do. */ enum { Low = 0, Band = 1, High = 2 }; SVF() { set_out (Low); set_f_Q (.1, .1); } void reset() { hi = band = lo = 0; } void set_f_Q (double fc, double Q) { /* this is a very tight limit */ f = min (.25, 2 * sin (M_PI * fc / OVERSAMPLE)); q = 2 * cos (pow (Q, .1) * M_PI * .5); q = min (q, min (2., 2 / f - f * .5)); qnorm = sqrt (fabs (q) / 2. + .001); } void set_out (int o) { if (o == Low) out = &lo; else if (o == Band) out = &band; else out = &hi; } void one_cycle (sample_t * s, int frames) { for (int i = 0; i < frames; ++i) s[i] = process (s[i]); } sample_t process (sample_t x) { x = qnorm * x; for (int pass = 0; pass < OVERSAMPLE; ++pass) { hi = x - lo - q * band; band += f * hi; lo += f * band; /* zero-padding, not 0th order holding. */ x = 0; } /* peak and notch outputs don't belong in the loop, put them * here (best in a template) if needed. */ return *out; } }; template <int STACKED, int OVERSAMPLE> class StackedSVF { public: SVF<OVERSAMPLE> svf [STACKED]; void reset() { for (int i = 0; i < STACKED; ++i) svf[i].reset(); } void set_out (int out) { for (int i = 0; i < STACKED; ++i) svf[i].set_out (out); } void set_f_Q (double f, double Q) { for (int i = 0; i < STACKED; ++i) svf[i].set_f_Q (f, Q); } sample_t process (sample_t x) { for (int i = 0; i < STACKED; ++i) x = svf[i].process (x); return x; } }; } /* namespace DSP */ #endif /* _DSP_SVF_H_ */
4,181
C++
.h
157
23.165605
87
0.622083
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,143
OnePole.h
LMMS_lmms/plugins/LadspaEffect/caps/dsp/OnePole.h
/* dsp/OnePole.h Copyright 2003-7 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ one pole (or one zero, or one zero, one pole) hi- and lo-pass filters. */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. */ #ifndef _ONE_POLE_H_ #define _ONE_POLE_H_ namespace DSP { class OnePoleLP { public: sample_t a0, b1, y1; OnePoleLP (double d = 1.) { set (d); y1 = 0.; } inline void reset() { y1 = 0.; } inline void set_f (double fc) { set (exp (-2 * M_PI * fc)); } inline void set (double d) { a0 = (sample_t) d; b1 = (sample_t) 1. - d; } inline sample_t process (sample_t x) { return y1 = a0 * x + b1 * y1; } inline void decay (double d) { a0 *= d; b1 = 1. - a0; } /* clear denormal numbers in history */ void flush_0() { if (is_denormal (y1)) y1 = 0; } }; class OnePoleHP { public: sample_t a0, a1, b1, x1, y1; OnePoleHP (double d = 1.) { set (d); x1 = y1 = 0.; } void set_f (double f) { set (exp (-2 * M_PI * f)); } inline void set (double d) { a0 = (sample_t) ((1. + d) / 2.); a1 = (sample_t) ((1. + d) / -2.); b1 = d; } inline sample_t process (sample_t x) { y1 = a0 * x + a1 * x1 + b1 * y1; x1 = x; return y1; } void reset() { x1 = y1 = 0; } /* clear denormal numbers in history */ void flush_0() { if (is_denormal (y1)) y1 = 0; } }; } /* namespace DSP */ #endif /* _ONE_POLE_H_ */
2,211
C++
.h
99
18.767677
71
0.617675
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,144
TDFII.h
LMMS_lmms/plugins/LadspaEffect/caps/dsp/TDFII.h
/* TDFII.h Copyright 2006-7 David Yeh <dtyeh@ccrma.stanford.edu> (implementation) Tim Goetze <tim@quitte.de> (cosmetics) transposed Direct Form II digital filter. Assumes order of b = order of a. Assumes a0 = 1. */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. */ #ifndef _DSP_TDFII_H_ #define _DSP_TDFII_H_ namespace DSP { // ORDER is the highest power of s in the transfer function template <int Order> class TDFII { public: double a[Order + 1]; double b[Order + 1]; double h[Order + 1]; void reset() { for (int i = 0; i <= Order; ++i) h[i] = 0; // zero state } void init (double fs) { reset(); clear(); } void clear() { for (int i=0; i<= Order; i++) a[i] = b[i] = 1; } /* per-band recursion: * y = 2 * (a * (x - x[-2]) + c * y[-1] - b * y[-2]) */ sample_t process (sample_t s) { double y = h[0] + b[0] * s; for (int i = 1; i < Order; ++i) h[i - 1] = h[i] + b[i] * s - a[i] * y; h[Order - 1] = b[Order] * s - a[Order] * y; return (sample_t) y; } }; } /* namespace DSP */ #endif /* _DSP_TDFII_H_ */
1,824
C++
.h
63
25.714286
66
0.650402
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,145
White.h
LMMS_lmms/plugins/LadspaEffect/caps/dsp/White.h
/* dsp/White.h Copyright 2004 Tim Goetze <tim@quitte.de> simple white noise generator, based on Jon Dattorro's 3/2002 JAES paper. quite an elegant design; consumes next to no CPU on a processor providing a decent binary shift operator. most of all, no random() calls. */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. */ #ifndef _DSP_WHITE_H_ #define _DSP_WHITE_H_ namespace DSP { /* after initializing, call either get() or get_31() to get a sample, don't * mix them. (get_31 output goes out of range if called after get()). */ class White { public: uint32 b; White() { b = 0x1fff7777; } void init (float f) { b = (uint32) (f * (float) 0x1fff7777); } sample_t abs() { return fabs (get()); } /* 32-bit version */ sample_t get() { # define BIT(y) ((b << (31 - y)) & 0x80000000) b = ((BIT (28) ^ BIT (27) ^ BIT (1) ^ BIT (0))) | (b >> 1); return (4.6566128730773926e-10 * (sample_t) b) - 1; # undef BIT } /* 31-bit version, at least 6 instructions less / sample. probably only * pays off on a processor not providing a decent binary shift. */ sample_t get_31() { # define BIT(y) ((b << (30 - y)) & 0x40000000) b = ((BIT (3) ^ BIT (0))) | (b >> 1); return (9.3132257461547852e-10 * (sample_t) b) - 1; # undef BIT } }; } /* namespace DSP */ #endif /* _DSP_WHITE_H_ */
2,075
C++
.h
63
30.031746
75
0.679558
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,146
FIR.h
LMMS_lmms/plugins/LadspaEffect/caps/dsp/FIR.h
/* dsp/FIR.h Copyright 2003-10 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ finite impulse response filters, with options for up- and down-sampling. */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. */ #ifndef _FIR_H_ #define _FIR_H_ #include "util.h" namespace DSP { /* brute-force FIR filter with downsampling method (decimating). * * CAVEAT: constructing it from another FIR makes the filter share the other's * kernel data set. IOW, the other FIR must be valid throughout the lifetime * of this instance. */ class FIR { public: /* kernel length, history length - 1 */ int n, m; /* coefficients, history */ sample_t * c, * x; bool borrowed_kernel; /* history index */ int h; FIR (int N) { c = 0; init (N); } FIR (FIR & fir) { c = fir.c; init (fir.n); } FIR (int n, sample_t * kernel) { c = 0; init (n); memcpy (c, kernel, n * sizeof (*c)); } ~FIR() { if (!borrowed_kernel) free (c); free (x); } void init (int N) { n = N; /* keeping history size a power of 2 makes it possible to wrap the * history pointer by & instead of %, saving a few cpu cycles. */ m = next_power_of_2 (n); if (c) borrowed_kernel = true; else borrowed_kernel = false, c = (sample_t *) malloc (n * sizeof (sample_t)); x = (sample_t *) malloc (m * sizeof (sample_t)); m -= 1; reset(); } void reset() { h = 0; memset (x, 0, n * sizeof (sample_t)); } /* TODO: write an SSE-enabled version */ inline sample_t process (sample_t s) { x[h] = s; s *= c[0]; for (int Z = 1, z = h - 1; Z < n; --z, ++Z) s += c[Z] * x[z & m]; h = (h + 1) & m; return s; } /* Z is the time, in samples, since the last non-zero sample. * OVER is the oversampling factor. just here for documentation, use * a FIRUpsampler instead. */ template <int Z, int OVER> inline sample_t upsample (sample_t s) { x[h] = s; s = 0; /* for the interpolation, iterate over the history in z ^ -OVER * steps -- all the samples between are 0. */ for (int j = Z, z = h - Z; j < n; --z, j += OVER) s += c[j] * x[z & m]; h = (h + 1) & m; return s; } /* used in downsampling */ inline void store (sample_t s) { x[h] = s; h = (h + 1) & m; } }; /* close relative of FIR, but distinct enough to not justify inheritance. * * the difference to the FIR is the shorter history length. don't need * to clutter the d-cache with interleaved 0s. * * however, an initial test shows this to be a fraction *slower* than a * complete FIR for N = 32, OVER = 4. */ class FIRUpsampler { public: /* kernel length, history length - 1 */ int n, m; /* oversampling ratio */ int over; /* coefficients, history */ sample_t * c, * x; /* history index */ int h; FIRUpsampler (int _n, int _over) { c = x = 0; init (_n, _over); } FIRUpsampler (FIR & fir, int _over) { c = x = 0; init (fir.n, _over); memcpy (c, fir.c, n * sizeof (sample_t)); } ~FIRUpsampler() { if (c) free (c); if (x) free (x); } void init (int _n, int _over) { /* oversampling ratio must be multiple of FIR kernel length */ // assert (_n % _over == 0); n = _n; over = _over; /* like FIR, keep the history buffer a power of 2; additionally, * compress and don't store the 0 samples inbetween. */ m = next_power_of_2 ((n + over - 1) / over); c = (sample_t *) malloc (n * sizeof (sample_t)); x = (sample_t *) malloc (m * sizeof (sample_t)); m -= 1; reset(); } void reset() { h = 0; memset (x, 0, (m + 1) * sizeof (sample_t)); } /* upsample the given sample */ inline sample_t upsample (sample_t s) { x[h] = s; s = 0; for (int Z = 0, z = h; Z < n; --z, Z += over) s += c[Z] * x[z & m]; h = (h + 1) & m; return s; } /* upsample a zero sample (interleaving), Z being the time, in samples, * since the last non-0 sample. */ inline sample_t pad (int Z) { sample_t s = 0; for (int z = h - 1; Z < n; --z, Z += over) s += c[Z] * x[z & m]; return s; } }; }; /* namespace DSP */ #endif /* _FIR_H_ */
5,042
C++
.h
193
21.958549
79
0.597646
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,147
BiQuad.h
LMMS_lmms/plugins/LadspaEffect/caps/dsp/BiQuad.h
/* dsp/BiQuad.h Copyright 2003-7 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ Bi-quad IIR filter. */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. */ #ifndef _DSP_BI_QUAD_H_ #define _DSP_BI_QUAD_H_ namespace DSP { class BiQuad { public: /* coefficients */ sample_t a[3], b[3]; /* history */ int h; sample_t x[2], y[2]; BiQuad() { unity(); reset(); } void unity() { a[0] = 1; a[1] = a[2] = b[0] = b[1] = b[2] = 0; } void copy (BiQuad & bq) { for (int i = 0; i < 3; ++i) a[i] = bq.a[i], b[i] = bq.b[i]; } void reset() { h = 0; x[0] = x[1] = y[0] = y[1] = 0.; } /* denormal zapping */ void flush_0() { for (int i = 0; i < 2; ++i) if (is_denormal (y[i])) y[i] = 0; } inline sample_t process (sample_t s) { int z = h; sample_t r = s * a[0]; r += a[1] * x[z]; r += b[1] * y[z]; z ^= 1; r += a[2] * x[z]; r += b[2] * y[z]; y[z] = r; x[z] = s; h = z; return r; } /* Following are additional methods for using the biquad to filter an * upsampled signal with 0 padding -- some terms reduce to 0 in this * case */ inline sample_t process_0_1() { int z = h; sample_t r = 0; r += a[1] * x[z]; r += b[1] * y[z]; z ^= 1; r += a[2] * x[z]; r += b[2] * y[z]; y[z] = r; x[z] = 0; h = z; return r; } inline sample_t process_0_2() { int z = h; sample_t r = 0; r += b[1] * y[z]; z ^= 1; r += a[2] * x[z]; r += b[2] * y[z]; y[z] = r; x[z] = 0; h = z; return r; } inline sample_t process_0_3() { int z = h; sample_t r = 0; r += b[1] * y[z]; z ^= 1; r += b[2] * y[z]; y[z] = r; x[z] = 0; h = z; return r; } }; } /* namespace DSP */ #endif /* _DSP_BI_QUAD_H_ */
2,635
C++
.h
119
17.663866
71
0.545604
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,149
Lorenz.h
LMMS_lmms/plugins/LadspaEffect/caps/dsp/Lorenz.h
/* dsp/Lorenz.h Copyright 2001-4 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ Lorenz fractal. */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. */ #ifndef _DSP_LORENZ_H_ #define _DSP_LORENZ_H_ namespace DSP { class Lorenz { public: double x[2], y[2], z[2]; double h, a, b, c; int I; public: Lorenz() { h = 0.001; a = 10.0; b = 28.0; c = 8.0 / 3.0; } /* rate is normalized (0 .. 1) */ void set_rate (double r) { h = max (.0000001, r * .015); } void init (double _h = .001, double seed = .0) { I = 0; x[0] = .1 + seed - frandom() * .1; y[0] = 0; z[0] = 0; /* progress quickly to get a 'stable' system */ h = .001; int n = 10000 + min ((int) (10000 * seed), 10000); for (int i = 0; i < n; ++i) step(); h = _h; } sample_t get() { step(); return .5 * get_y() + get_z(); } void step() { int J = I ^ 1; x[J] = x[I] + h * a * (y[I] - x[I]); y[J] = y[I] + h * (x[I] * (b - z[I]) - y[I]); z[J] = z[I] + h * (x[I] * y[I] - c * z[I]); I = J; } double get_x() { return .024 * (x[I] - .172); } double get_y() { return .018 * (y[I] - .172); } double get_z() { return .019 * (z[I] - 25.43); } }; } /* namespace DSP */ #endif /* _DSP_LORENZ_H_ */
2,037
C++
.h
83
20.843373
66
0.586583
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,150
Delay.h
LMMS_lmms/plugins/LadspaEffect/caps/dsp/Delay.h
/* dsp/Delay.h Copyright 2003-4, 2010 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ delay lines with fractional (linear or cubic interpolation) lookup and an allpass interpolating tap (which needs more work). delay line storage is aligned to powers of two for simplified wrapping checks (no conditional or modulo, binary and suffices instead). */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. */ #ifndef _DSP_DELAY_H_ #define _DSP_DELAY_H_ #include "util.h" #include "FPTruncateMode.h" namespace DSP { class Delay { public: int size; sample_t * data; int read, write; Delay() { read = write = 0; data = 0; } ~Delay() { if (data) free (data); } void init (int n) { size = next_power_of_2 (n); data = (sample_t *) calloc (sizeof (sample_t), size); size -= 1; write = n; } void reset() { memset (data, 0, (size + 1) * sizeof (sample_t)); } sample_t & operator [] (int i) { return data [(write - i) & size]; } inline void put (sample_t x) { data [write] = x; write = (write + 1) & size; } inline sample_t get() { sample_t x = data [read]; read = (read + 1) & size; return x; } inline sample_t putget (sample_t x) { put (x); return get(); } /* fractional lookup, linear interpolation */ inline sample_t get_at (float f) { int n; fistp (f, n); /* read: i = (int) f; relies on FPTruncateMode */ f -= n; return (1 - f) * (*this) [n] + f * (*this) [n + 1]; } /* fractional lookup, cubic interpolation */ inline sample_t get_cubic (float f) { int n; fistp (f, n); /* see FPTruncateMode */ f -= n; sample_t x_1 = (*this) [n - 1]; sample_t x0 = (*this) [n]; sample_t x1 = (*this) [n + 1]; sample_t x2 = (*this) [n + 2]; /* sample_t (32bit) quicker than double here */ sample_t a = (3 * (x0 - x1) - x_1 + x2) * .5; sample_t b = 2 * x1 + x_1 - (5 * x0 + x2) * .5; sample_t c = (x1 - x_1) * .5; return x0 + (((a * f) + b) * f + c) * f; } }; /* allpass variant */ class DelayTapA { public: sample_t x1, y1; DelayTapA() { reset(); } void reset() { x1 = y1 = 0; } sample_t get (Delay & d, float f) { int n; fistp (f, n); /* read: n = (int) f; relies on FPTruncateMode */ f -= n; sample_t x = d[n]; f = (1 - f) / (1 + f); y1 = x1 + f * x - f * y1; x1 = x; return y1; } }; }; /* namespace DSP */ #endif /* _DSP_DELAY_H_ */
3,268
C++
.h
135
20.377778
71
0.603944
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
20,151
Sine.h
LMMS_lmms/plugins/LadspaEffect/caps/dsp/Sine.h
/* dsp/Sine.h Copyright 2003-4 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ direct form I recursive sin() generator. */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. */ #ifndef _DSP_SINE_H_ #define _DSP_SINE_H_ namespace DSP { class Sine { protected: int z; double y[2]; double b; public: Sine() { b = 0; y[0] = y[1] = 0; z = 0; } Sine (double f, double fs, double phase) { set_f (f, fs, phase); } Sine (double omega, double phase = 0.) { set_f (omega, phase); } inline void set_f (double f, double fs, double phase) { set_f (f * M_PI / fs, phase); } inline void set_f (double w, double phase) { b = 2 * cos (w); y[0] = sin (phase - w); y[1] = sin (phase - w * 2); z = 0; } /* advance and return 1 sample */ inline double get() { double s = b * y[z]; z ^= 1; s -= y[z]; return y[z] = s; } double get_phase() { double x0 = y[z], x1 = b * y[z] - y[z^1]; double phi = asin (x0); /* slope is falling, we're into the 2nd half. */ if (x1 < x0) return M_PI - phi; return phi; } }; } /* namespace DSP */ #endif /* _DSP_SINE_H_ */
1,898
C++
.h
75
21.746667
66
0.641982
LMMS/lmms
7,989
994
1,122
GPL-2.0
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false