mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-23 16:17:53 -05:00
Tried to get spectogram working
This commit is contained in:
parent
1dac530940
commit
49edef40cc
1 changed files with 13 additions and 3 deletions
|
@ -854,8 +854,12 @@ class ChartEditorState extends HaxeUIState
|
||||||
function buildSpectrogram(target:FlxSound)
|
function buildSpectrogram(target:FlxSound)
|
||||||
{
|
{
|
||||||
gridSpectrogram = new PolygonSpectogram(target, SPECTROGRAM_COLOR, FlxG.height / 2, Math.floor(FlxG.height / 2));
|
gridSpectrogram = new PolygonSpectogram(target, SPECTROGRAM_COLOR, FlxG.height / 2, Math.floor(FlxG.height / 2));
|
||||||
gridSpectrogram.x = 0;
|
// Halfway through the grid.
|
||||||
gridSpectrogram.y = 0;
|
// gridSpectrogram.x = gridTiledSprite.x + STRUMLINE_SIZE * GRID_SIZE;
|
||||||
|
// gridSpectrogram.y = gridTiledSprite.y;
|
||||||
|
gridSpectrogram.x = 200;
|
||||||
|
gridSpectrogram.y = 200;
|
||||||
|
gridSpectrogram.visType = STATIC; // We move the spectrogram manually.
|
||||||
gridSpectrogram.waveAmplitude = 50;
|
gridSpectrogram.waveAmplitude = 50;
|
||||||
gridSpectrogram.scrollFactor.set(0, 0);
|
gridSpectrogram.scrollFactor.set(0, 0);
|
||||||
add(gridSpectrogram);
|
add(gridSpectrogram);
|
||||||
|
@ -2330,6 +2334,9 @@ class ChartEditorState extends HaxeUIState
|
||||||
// Move the rendered notes to the correct position.
|
// Move the rendered notes to the correct position.
|
||||||
renderedNotes.setPosition(gridTiledSprite.x, gridTiledSprite.y);
|
renderedNotes.setPosition(gridTiledSprite.x, gridTiledSprite.y);
|
||||||
renderedNoteSelectionSquares.setPosition(renderedNotes.x, renderedNotes.y);
|
renderedNoteSelectionSquares.setPosition(renderedNotes.x, renderedNotes.y);
|
||||||
|
// Move the spectrogram to the correct position.
|
||||||
|
// gridSpectrogram.y = gridTiledSprite.y;
|
||||||
|
gridSpectrogram.setPosition(0, 0);
|
||||||
|
|
||||||
return this.scrollPosition;
|
return this.scrollPosition;
|
||||||
}
|
}
|
||||||
|
@ -2404,7 +2411,10 @@ class ChartEditorState extends HaxeUIState
|
||||||
|
|
||||||
gridTiledSprite.height = songLength;
|
gridTiledSprite.height = songLength;
|
||||||
if (gridSpectrogram != null)
|
if (gridSpectrogram != null)
|
||||||
gridSpectrogram.setSound(audioVocalTrack);
|
{
|
||||||
|
gridSpectrogram.setSound(audioInstTrack);
|
||||||
|
gridSpectrogram.generateSection(0, songLengthInMs / 1000);
|
||||||
|
}
|
||||||
|
|
||||||
scrollPosition = 0;
|
scrollPosition = 0;
|
||||||
playheadPosition = 0;
|
playheadPosition = 0;
|
||||||
|
|
Loading…
Reference in a new issue