#include "types.h"#include "period-type.h"#include "player-core.h"

Classes | |
| class | clock_driver |
Functions | |
| signed8 | x_normalise (signed8 y) |
| signed8 | y_normalise (signed8 x) |
Variables | |
| quad_period_type | targetperiod |
| quad_period_type | currentperiod |
| quad_period_type | normalperiod |
| signed8 | x |
| signed8 | y |
| clock_driver * | metronome |
| signed8 x_normalise | ( | signed8 | y | ) |
| signed8 y_normalise | ( | signed8 | x | ) |
converts the x position (samples in the raw file) to a position given the current tempo.
Referenced by jumpto(), loop_jump(), map_active(), map_stop(), and Player::timerTick().
This variable denotes the current period, which is the length of 1 measure (=4 beats) which is used to play the song. The tempo must be set through the changetempo() function.
Referenced by Player::changeTempo(), core_meta_init(), jumpto(), lfo_set(), Player::mediumSwitch(), Player::nudgeMinus(), Player::nudgeMinus1M(), Player::nudgeMinus4M(), Player::nudgeMinus8M(), Player::nudgeMinusHalfB(), Player::nudgePlus(), Player::nudgePlus1M(), Player::nudgePlus4M(), Player::nudgePlus8M(), Player::nudgePlusB(), Player::Player(), BeatGraphAnalyzer::setTempo(), BpmAnalyzerDialog::tap(), Player::tempoChanged(), and Player::timerTick().
This variable denotes the period of 1 measure (4 beats) in the native song. This is thus the reciprocal of the native tempo To modify the tempo, one should go through the metronome.
Referenced by RhythmAnalyzer::calculateRhythmPattern2(), Player::changeTempo(), core_meta_init(), Player::loop(), Player::mapStart(), Player::normalTempo(), Player::nudgeCueBack8M(), Player::nudgeCueForward8M(), Player::Player(), WritingFinished::run(), BeatGraphAnalyzer::setTempo(), ActiveSomBeatGraph::start(), BpmAnalyzerDialog::tap(), Player::targetStep(), and Player::timerTick().
This variable denotes the target period, which is the length of 1 measure (=4 beats) at the command line requested playing speed
Referenced by core_meta_init(), BeatGraphAnalyzer::setTempo(), and Player::targetTempo().
| signed8 x |
x is the data position in the raw file (thus at normal tempo) This is calculated during streaming. So updating this variable doesn't have much effect. To have some effect you might need to set the y variable properly.
Referenced by histogram_type::bin(), RhythmAnalyzer::calculateRhythmPattern2(), clock_driver::changetempo(), SongMetriek::composition_dist(), QSong::data(), BeatGraphLabel::drawCueText(), energize(), SpectrumAnalyzer::fetchSpectrum_normal(), SongMetriek::histogram_dist(), loop_jump(), loop_set(), main(), map_active(), map_stop(), BpmCounter::measure(), Player::mouseMoveEvent(), Player::mousePressEvent(), Player::mouseReleaseEvent(), BeatGraphLabel::moveRuler(), normalize_draw_decompose(), pattern_shaped_test(), pattern_test(), SongMetriek::rhythm_dist(), clock_driver::set_normalperiod(), ActiveSomBeatGraph::start(), subtraction_test(), volumefade(), and wavelet_subtraction_test().
| signed8 y |
y is the position in the playing file (thus at target tempo) So if a song is 4 minutes and we play it at 50% of the normal speed then we have a total length of 8 minutes, which means that the position halfway the song will be at samplerate*4 and the last position in the song is at samplerate*8. If the song would play at double the speed then the last position in the song is at samplerate*4/8 (or samplerate/2) In other words. this is a tricky variable which is afterward transformed to the proper playing position x during the streaming. The advantage of this setup is that y can simply be incremented.
Referenced by Player::breakLfo(), RhythmAnalyzer::calculateRhythmPattern2(), clock_driver::changetempo(), SongMetriek::composition_dist(), cue_set(), QSong::data(), BeatGraphLabel::drawCueText(), Player::fastPan(), Player::fastRevSaw(), Player::fastSaw(), SpectrumAnalyzer::fetchSpectrum_normal(), SpectrumAnalyzer::fetchSpectrum_wavelet(), findMatchWithVolumeAccounting(), SongMetriek::histogram_dist(), jumpto(), lfo_break(), lfo_metronome(), lfo_pan(), lfo_revsaw(), lfo_saw(), lfo_set(), loop_jump(), main(), map_active(), map_set(), map_stop(), Player::metronome(), Player::mouseMoveEvent(), Player::mousePressEvent(), Player::mouseReleaseEvent(), Player::normalLfo(), Player::restart(), SongMetriek::rhythm_dist(), clock_driver::set_normalperiod(), clock_driver::shift(), Player::slowPan(), Player::slowRevSaw(), Player::slowSaw(), dsp_driver::start(), ActiveSomBeatGraph::start(), SpawnWhenActivated::start(), Analyzer::start(), and Player::timerTick().
1.6.2