Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multitap Echo Delay #1362

Merged
merged 3 commits into from
Nov 28, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 27 additions & 27 deletions data/themes/default/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ BBTCOView {

/* Plugins */

TripleOscillatorView knob {
TripleOscillatorView Knob {
color: rgb(1, 32, 64);
qproperty-outerColor: rgb(0, 0, 0);
qproperty-innerRadius: 2;
Expand All @@ -554,7 +554,7 @@ TripleOscillatorView knob {
}


kickerInstrumentView knob#smallKnob {
kickerInstrumentView Knob#smallKnob {
color: #595959;
qproperty-outerColor: black;
qproperty-innerRadius: 3;
Expand All @@ -565,7 +565,7 @@ kickerInstrumentView knob#smallKnob {
}


kickerInstrumentView knob#largeKnob {
kickerInstrumentView Knob#largeKnob {
color: #0c3b89;
qproperty-outerColor: #519fff;
qproperty-innerRadius: 12.0;
Expand All @@ -576,7 +576,7 @@ kickerInstrumentView knob#largeKnob {
}


AudioFileProcessorView knob {
AudioFileProcessorView Knob {
color: rgb(240, 147, 14);
qproperty-outerColor: rgb(30, 35, 37);
qproperty-innerRadius: 4;
Expand All @@ -586,7 +586,7 @@ AudioFileProcessorView knob {
qproperty-lineWidth: 3;
}

organicInstrumentView knob {
organicInstrumentView Knob {
color: rgb(124, 207, 98);
qproperty-outerColor: rgb(13, 42, 4);
qproperty-innerRadius: 2;
Expand All @@ -596,13 +596,13 @@ organicInstrumentView knob {
qproperty-lineWidth: 1.5;
}

organicInstrumentView knob#harmKnob {
organicInstrumentView Knob#harmKnob {
color: rgb(205, 98, 216);
qproperty-outerColor: rgb(18, 4, 18);
}

organicInstrumentView knob#fx1Knob,
organicInstrumentView knob#volKnob {
organicInstrumentView Knob#fx1Knob,
organicInstrumentView Knob#volKnob {
color: rgb(157, 157, 157);
qproperty-outerColor: rgb(37, 37, 37);
qproperty-innerRadius: 4;
Expand All @@ -612,7 +612,7 @@ organicInstrumentView knob#volKnob {
qproperty-lineWidth: 2;
}

sf2InstrumentView knob {
sf2InstrumentView Knob {
color: #ff00ea;
qproperty-outerColor: rgb(20, 5, 18);
qproperty-innerRadius: 2;
Expand All @@ -622,102 +622,102 @@ sf2InstrumentView knob {
qproperty-lineWidth: 2;
}

sfxrInstrumentView knob {
sfxrInstrumentView Knob {
color: #000;
qproperty-outerColor: rgb(194, 177, 145);
qproperty-innerRadius: 2;
qproperty-outerRadius: 9;
qproperty-lineWidth: 2;
}

sfxrInstrumentView knob#envKnob {
sfxrInstrumentView Knob#envKnob {
color: #263352;
qproperty-outerColor: #4b66a4;
}

sfxrInstrumentView knob#freqKnob {
sfxrInstrumentView Knob#freqKnob {
color: #1e4a22;
qproperty-outerColor: #3c9544;
}

sfxrInstrumentView knob#changeKnob {
sfxrInstrumentView Knob#changeKnob {
color: #591c1c;
qproperty-outerColor: #b23737;
}

sfxrInstrumentView knob#sqrKnob {
sfxrInstrumentView Knob#sqrKnob {
color: #3b2714;
qproperty-outerColor: #724c27;
}

sfxrInstrumentView knob#repeatKnob {
sfxrInstrumentView Knob#repeatKnob {
color: #292929;
qproperty-outerColor: #515151;
}

sfxrInstrumentView knob#phaserKnob {
sfxrInstrumentView Knob#phaserKnob {
color: #144c4d;
qproperty-outerColor: #299899;
}

sfxrInstrumentView knob#filterKnob {
sfxrInstrumentView Knob#filterKnob {
color: #47224c;
qproperty-outerColor: #8e4397;
}

opl2instrumentView knob {
opl2instrumentView Knob {
color: rgb(128,128,128);
qproperty-outerColor: rgb(255,255,255);
qproperty-innerRadius: 2;
qproperty-outerRadius: 9;
qproperty-lineWidth: 2;
}

sidInstrumentView knob {
sidInstrumentView Knob {
color: rgb(113,95,80);
qproperty-outerColor: rgb( 255,255,255 );
qproperty-innerRadius: 2;
qproperty-outerRadius: 7;
qproperty-lineWidth: 2;
}

WatsynView knob {
WatsynView Knob {
qproperty-innerRadius: 1;
qproperty-outerRadius: 7;
qproperty-centerPointX: 9.5;
qproperty-centerPointY: 9.5;
qproperty-lineWidth: 2;
}

WatsynView knob#aKnob {
WatsynView Knob#aKnob {
color: #43b2ff;
qproperty-outerColor: #43b2ff;
}

WatsynView knob#bKnob {
WatsynView Knob#bKnob {
color: #fc5431;
qproperty-outerColor: #fc5431;
}

WatsynView knob#mixKnob {
WatsynView Knob#mixKnob {
color: #43ff82;
qproperty-outerColor: #43ff82;
qproperty-outerRadius: 13;
qproperty-centerPointX: 15.5;
qproperty-centerPointY: 15.5;
}

WatsynView knob#mixenvKnob {
WatsynView Knob#mixenvKnob {
color: #43ff82;
qproperty-outerColor: #43ff82;
}

WatsynView knob#xtalkKnob {
WatsynView Knob#xtalkKnob {
color: #fb50fb;
qproperty-outerColor: #fb50fb;
}

MonstroView knob {
MonstroView Knob {
color: #ffffff;
qproperty-outerColor: #aaaaaa;
qproperty-outerRadius: 9;
Expand All @@ -727,7 +727,7 @@ MonstroView knob {
qproperty-lineWidth: 2.5;
}

NesInstrumentView knob {
NesInstrumentView Knob {
color: #e7231b;
qproperty-outerColor: #fff;
qproperty-outerRadius: 11.0;
Expand Down
3 changes: 2 additions & 1 deletion include/Graph.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class EXPORT graphModel : public Model

inline int length() const
{
return( m_samples.count() );
return m_length;
}

inline const float * samples() const
Expand Down Expand Up @@ -175,6 +175,7 @@ public slots:
void drawSampleAt( int x, float val );

QVector<float> m_samples;
int m_length;
float m_minValue;
float m_maxValue;
float m_step;
Expand Down
3 changes: 3 additions & 0 deletions include/MixHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ void add( sampleFrame* dst, const sampleFrame* src, int frames );
/*! \brief Add samples from src multiplied by coeffSrc to dst */
void addMultiplied( sampleFrame* dst, const sampleFrame* src, float coeffSrc, int frames );

/*! \brief Add samples from src multiplied by coeffSrc to dst, swap inputs */
void addSwappedMultiplied( sampleFrame* dst, const sampleFrame* src, float coeffSrc, int frames );

/*! \brief Add samples from src multiplied by coeffSrc and coeffSrcBuf to dst */
void addMultipliedByBuffer( sampleFrame* dst, const sampleFrame* src, float coeffSrc, ValueBuffer * coeffSrcBuf, int frames );

Expand Down
28 changes: 23 additions & 5 deletions include/RingBuffer.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* RingBuffer.h - an effective, thread-safe and flexible implementation of a ringbuffer for LMMS
* RingBuffer.h - an effective and flexible implementation of a ringbuffer for LMMS
*
* Copyright (c) 2014 Vesa Kivimäki
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
Expand Down Expand Up @@ -32,7 +32,7 @@
#include "lmms_math.h"
#include "MemoryManager.h"

class RingBuffer : public QObject
class EXPORT RingBuffer : public QObject
{
Q_OBJECT
MM_OPERATORS
Expand Down Expand Up @@ -179,21 +179,39 @@ class RingBuffer : public QObject
*/
void writeAddingMultiplied( sampleFrame * src, float offset, f_cnt_t length, float level );

/** \brief Mixes a buffer of sampleframes additively to the ringbuffer at specified position, with
* a specified multiplier applied to the frames, with swapped channels
* \param src Pointer to the source buffer
* \param offset Offset in frames against current position, may *NOT* be negative
* \param length Length of the source buffer, if zero, period size is used - must not be higher than the size of the ringbuffer!
* \param level Multiplier applied to the frames before they're written to the ringbuffer
*/
void writeSwappedAddingMultiplied( sampleFrame * src, f_cnt_t offset, f_cnt_t length, float level );

/** \brief Mixes a buffer of sampleframes additively to the ringbuffer at specified position, with
* a specified multiplier applied to the frames, with swapped channels
* \param src Pointer to the source buffer
* \param offset Offset in milliseconds against current position, may *NOT* be negative
* \param length Length of the source buffer, if zero, period size is used
* \param level Multiplier applied to the frames before they're written to the ringbuffer
*/
void writeSwappedAddingMultiplied( sampleFrame * src, float offset, f_cnt_t length, float level );


protected slots:
void updateSamplerate();

private:
inline f_cnt_t msToFrames( float ms )
{
return static_cast<f_cnt_t>( ceilf( ms * m_samplerate / 1000 ) );
return static_cast<f_cnt_t>( ceilf( ms * (float)m_samplerate * 0.001f ) );
}

const fpp_t m_fpp;
sample_rate_t m_samplerate;
f_cnt_t m_size;
size_t m_size;
sampleFrame * m_buffer;
f_cnt_t m_position;
volatile unsigned int m_position;

};
#endif
1 change: 1 addition & 0 deletions plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ ADD_SUBDIRECTORY(LadspaEffect)
ADD_SUBDIRECTORY(lb302)
#ADD_SUBDIRECTORY(lb303)
ADD_SUBDIRECTORY(MidiImport)
ADD_SUBDIRECTORY(MultitapEcho)
ADD_SUBDIRECTORY(monstro)
ADD_SUBDIRECTORY(nes)
ADD_SUBDIRECTORY(opl2)
Expand Down
3 changes: 3 additions & 0 deletions plugins/MultitapEcho/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
INCLUDE(BuildPlugin)

BUILD_PLUGIN(multitapecho MultitapEcho.cpp MultitapEchoControls.cpp MultitapEchoControlDialog.cpp MOCFILES MultitapEchoControls.h MultitapEchoControlDialog.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png")
Loading