Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f09a8e8
Fix #100 and bug where 3rd snaps were not saved to the simfile.
uvcat7 Jul 10, 2025
450cb6b
Fix hold quantizations being incorrectly saved.
uvcat7 Jul 10, 2025
8ec05f9
Improve stability of MP3 loading
sukibaby Jul 10, 2025
b3e14e1
More sanitization on the saving compression logic.
uvcat7 Jul 10, 2025
d14a13b
Fix waveform rendering crash on loading mp3 audio
uvcat7 Jul 10, 2025
353ef17
Fix quantization loading of holds across measures.
uvcat7 Jul 10, 2025
1471f05
Handle changing the quantization while stepping. Refactored saving, a…
uvcat7 Jul 10, 2025
a45a52a
Don't save 6 rows.
uvcat7 Jul 10, 2025
41aee2f
Ditto, but better.
uvcat7 Jul 10, 2025
2f5574c
Merge pull request #108 from uvcat7/sukibaby-patch-mp3load
uvcat7 Jul 10, 2025
173adcc
Massively simplify.
uvcat7 Jul 11, 2025
247be31
.sm files now save decimals to 6 places. Closes #110.
uvcat7 Jul 11, 2025
f2fafe7
Fix wav format compliance
sukibaby Jul 11, 2025
090e38d
Merge pull request #112 from uvcat7/sukibaby-patch-wavloader
uvcat7 Jul 11, 2025
7a6a26e
Merge branch 'release-1.0.1' into custom-snap-bounds
uvcat7 Jul 11, 2025
42e09d4
Great, I typoed.
uvcat7 Jul 11, 2025
aa40406
Merge branch 'custom-snap-bounds' of https://github.com/uvcat7/ArrowV…
uvcat7 Jul 11, 2025
adebe64
Fix for code scanning alert: Workflow does not contain permissions
ScottBrenner Jul 11, 2025
5fb98a4
Dependabot configuration to update actions in workflow
ScottBrenner Jul 11, 2025
998d0c5
Merge branch 'release-1.0.1' into alert-autofix-1
StarbotArc Jul 11, 2025
60d8e47
Merge pull request #114 from ScottBrenner/alert-autofix-1
uvcat7 Jul 11, 2025
48403a2
Correct workflow syntax
ScottBrenner Jul 11, 2025
9cfc49b
Merge pull request #115 from ScottBrenner/patch-2
uvcat7 Jul 11, 2025
d5ca53a
Merge pull request #113 from ScottBrenner/patch-1
uvcat7 Jul 11, 2025
bb570c1
Do not try to upload to Delta VPS anymore
DeltaEpsilon7787 Jul 11, 2025
2c3cbdd
Remove beta branch restriction for builds
ScottBrenner Jul 11, 2025
797476b
Merge branch 'release-1.0.1' into DeltaEpsilon7787-patch-1
uvcat7 Jul 11, 2025
d23e827
Merge pull request #117 from uvcat7/DeltaEpsilon7787-patch-1
uvcat7 Jul 11, 2025
4ca7c91
Merge pull request #111 from uvcat7/custom-snap-bounds
uvcat7 Jul 11, 2025
a402e83
Refactor pathing in workflow
ScottBrenner Jul 11, 2025
43c540f
Fixed warp rendering being off by a row sometimes. (#120)
uvcat7 Jul 11, 2025
09733b8
CDTitles look for "title" and release information update
uvcat7 Jul 12, 2025
d3892e5
Merge pull request #123 from uvcat7/release-1.0.1
uvcat7 Jul 12, 2025
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
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
# Enable version updates for GitHub Actions
- package-ecosystem: "github-actions"
# Look for GitHub Actions workflows in the `root` directory
directory: "/"
# Check the for updates once a week
schedule:
interval: "weekly"
27 changes: 11 additions & 16 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,40 @@
name: Build & Latest Beta

on:
push:
pull_request:
branches:
- beta
paths-ignore:
- '**.md'

name: Latest Beta

jobs:
windows:
name: "Build Windows x64"
runs-on: windows-2022
defaults:
run:
working-directory: ${{github.workspace}}/main
permissions:
contents: read
steps:
- name: Get AV
uses: actions/checkout@v3
with:
path: main
- name: Get MSBuild
uses: microsoft/setup-msbuild@v2
- name: Obtain oggenc2.exe
run: >
curl https://www.rarewares.org/files/ogg/oggenc2.88-1.3.7-x64.zip --output oggenc.zip &&
unzip oggenc.zip -d .
shell: bash
- name: Build AV
run: msbuild build\VisualStudio\ArrowVortex.vcxproj /p:Configuration=Release /p:Platform=x64
- name: Collect into a directory
if: github.ref_name == 'beta'
run: |
mkdir AV
cd AV
cp -r ../bin/assets .
cp -r ../bin/noteskins .
cp -r ../bin/settings .
cp ../bin/ArrowVortex.exe .
cp ../oggenc2.exe .
cp -r bin/{assets,noteskins,settings} AV
cp bin/ArrowVortex.exe oggenc2.exe AV
shell: bash
- name: Upload artifact
if: github.ref_name == 'beta'
uses: actions/upload-artifact@v4
with:
name: AV
path: main/AV/
path: AV/
if-no-files-found: error
19 changes: 19 additions & 0 deletions src/Core/Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,25 @@ inline color32 ToColor32(float r, float g, float b, float a)
return u32;
}

static int gcd(int a, int b)
{
if (a == 0)
{
return b;
}
if (b == 0)
{
return a;
}
if (a > b)
{
return gcd(a - b, b);
}
else
{
return gcd(a, b - a);
}
}
}; // namespace Vortex

#undef TT
2 changes: 1 addition & 1 deletion src/Dialogs/AdjustSync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ WgSpinner* DialogAdjustSync::myCreateWidgetRow(StringRef label, double& val, int
{
WgSpinner* spinner = myLayout.add<WgSpinner>(label);
spinner->value.bind(&val);
spinner->setPrecision(3, 3);
spinner->setPrecision(3, 6);
spinner->onChange.bind(this, &DialogAdjustSync::onAction, setAction);
spinner->setTooltip(tooltip1);

Expand Down
2 changes: 2 additions & 0 deletions src/Dialogs/AdjustTempo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,12 @@ void DialogAdjustTempo::myCreateWidgets()

WgSpinner* bpm = myCreateWidgetRow("BPM", 0, myBPM, ACT_BPM_SET);
bpm->setRange(VC_MIN_BPM, VC_MAX_BPM);
bpm->setPrecision(3, 6);
bpm->setStep(1.0);

WgSpinner* stop = myCreateWidgetRow("Stop", 28, myStop, ACT_STOP_SET);
stop->setRange(VC_MIN_STOP, VC_MAX_STOP);
stop->setPrecision(3, 6);
stop->setStep(0.001);

myLayout.row().col(242);
Expand Down
12 changes: 6 additions & 6 deletions src/Dialogs/AdjustTempoSM5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void DialogAdjustTempoSM5::myCreateWidgets()

WgSpinner* spinner = myLayout.add<WgSpinner>("Delay");
spinner->value.bind(&myDelay);
spinner->setPrecision(3, 3);
spinner->setPrecision(3, 6);
spinner->setStep(0.001);
spinner->setRange(0, 1000);
spinner->onChange.bind(this, &DialogAdjustTempoSM5::onAction, (int)ACT_DELAY_SET);
Expand All @@ -70,7 +70,7 @@ void DialogAdjustTempoSM5::myCreateWidgets()
myLayout.row().col(84).col(154);
spinner = myLayout.add<WgSpinner>("Warp");
spinner->value.bind(&myWarp);
spinner->setPrecision(3, 3);
spinner->setPrecision(3, 6);
spinner->setRange(0, 1000);
spinner->onChange.bind(this, &DialogAdjustTempoSM5::onAction, (int)ACT_WARP_SET);
spinner->setTooltip("Warp length at the current beat, in beats");
Expand Down Expand Up @@ -120,15 +120,15 @@ void DialogAdjustTempoSM5::myCreateWidgets()

spinner = myLayout.add<WgSpinner>("Speed");
spinner->value.bind(&mySpeedRatio);
spinner->setPrecision(2, 2);
spinner->setPrecision(2, 6);
spinner->setStep(0.1);
spinner->setRange(0, 1000);
spinner->onChange.bind(this, &DialogAdjustTempoSM5::onAction, (int)ACT_SPEED_SET);
spinner->setTooltip("Stretch ratio");

spinner = myLayout.add<WgSpinner>();
spinner->value.bind(&mySpeedDelay);
spinner->setPrecision(2, 2);
spinner->setPrecision(2, 6);
spinner->setStep(0.1);
spinner->setRange(0, 1000);
spinner->onChange.bind(this, &DialogAdjustTempoSM5::onAction, (int)ACT_SPEED_SET);
Expand All @@ -145,15 +145,15 @@ void DialogAdjustTempoSM5::myCreateWidgets()

spinner = myLayout.add<WgSpinner>("Scroll");
spinner->value.bind(&myScrollRatio);
spinner->setPrecision(2, 2);
spinner->setPrecision(2, 6);
spinner->setStep(0.1);
spinner->setRange(0, 1000);
spinner->onChange.bind(this, &DialogAdjustTempoSM5::onAction, (int)ACT_SCROLL_SET);
spinner->setTooltip("Scroll ratio");

spinner = myLayout.add<WgSpinner>("Fakes");
spinner->value.bind(&myFakeBeats);
spinner->setPrecision(3, 3);
spinner->setPrecision(3, 6);
spinner->setRange(0, 1000);
spinner->onChange.bind(this, &DialogAdjustTempoSM5::onAction, (int)ACT_FAKE_SET);
spinner->setTooltip("Fake region, in beats");
Expand Down
5 changes: 2 additions & 3 deletions src/Dialogs/CustomSnap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,16 @@ namespace Vortex {
WgSpinner* scol = myLayout.add<WgSpinner>("Snapping");
scol->value.bind(&myCustomSnap);
scol->onChange.bind(this, &DialogCustomSnap::onChange);
scol->setRange(1.0, 192.0);
scol->setRange(4.0, 192.0);
scol->setPrecision(0, 0);
scol->startCapturingText();
}

void DialogCustomSnap::onChange()
{
if (myCustomSnap > 0 && myCustomSnap <= 192)
if (myCustomSnap >= 4 && myCustomSnap <= 192)
{
gView->setCustomSnap(myCustomSnap);
//requestClose();
}
}
}; // namespace Vortex
28 changes: 28 additions & 0 deletions src/Editor/Editing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,26 @@ void onChanges(int changes)
// ================================================================================================
// EditingImpl :: member functions.

static int gcd(int a, int b)
{
if (a == 0)
{
return b;
}
if (b == 0)
{
return a;
}
if (a > b)
{
return gcd(a - b, b);
}
else
{
return gcd(a, b - a);
}
}

void finishNotePlacement(int col)
{
auto& pnote = myPlacingNotes[col];
Expand All @@ -348,6 +368,14 @@ void finishNotePlacement(int col)
}
}

if (note.quant > 0 && note.quant <= 192)
{
note.quant = min(192u, note.quant * gView->getSnapQuant() / gcd(note.quant, gView->getSnapQuant()));
}
else
{
note.quant = 192;
}
NoteEdit edit;
edit.add.append(note);
gNotes->modify(edit, false);
Expand Down
6 changes: 3 additions & 3 deletions src/Editor/LoadMp3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include <stdio.h>
#include <string.h>
#include <memory>

#include <System/File.h>

Expand Down Expand Up @@ -431,19 +432,18 @@ int MP3Loader::readFrames(int frames, short* buffer)

SoundSource* LoadMP3(FileReader* file, String& title, String& artist)
{
MP3Loader* loader = new MP3Loader;
std::unique_ptr<MP3Loader> loader = std::make_unique<MP3Loader>();
loader->file = file;

// Decode and synth the first frame to check if the file is valid.
if(!loader->decodeFirstFrame())
{
loader->file = nullptr;
delete loader;
return nullptr;
}

// The file is valid, return the MP3 loader.
return loader;
return loader.release();
}

}; // namespace Vortex
32 changes: 19 additions & 13 deletions src/Editor/LoadWav.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ namespace {
#pragma pack(1)
struct WaveHeader
{
uint8_t chunkId[4];
uint8_t chunkId[4]; // "RIFF"
uint32_t chunkSize;
uint8_t format[4];
uint8_t subChunkId[4];
uint32_t subChunkSize;
uint8_t format[4]; // "WAVE"
uint8_t subchunk1Id[4]; // "fmt "
uint32_t subchunk1Size;
uint16_t audioFormat;
uint16_t numChannels;
uint32_t sampleRate;
uint32_t byteRate;
uint16_t blockAlign;
uint16_t bps;
uint16_t bitsPerSample;
};
struct WaveData
{
Expand Down Expand Up @@ -72,32 +72,38 @@ SoundSource* LoadWav(FileReader* file, String& title, String& artist)
if(file->read(&header, sizeof(WaveHeader), 1) == 0
|| memcmp(header.chunkId, "RIFF", 4) != 0
|| memcmp(header.format, "WAVE", 4) != 0
|| memcmp(header.subChunkId, "fmt ", 4) != 0
|| memcmp(header.subchunk1Id, "fmt ", 4) != 0
|| header.audioFormat != 1
|| header.sampleRate == 0
|| header.numChannels == 0
|| (header.bps != 8 && header.bps != 16 && header.bps != 24))
|| (header.bitsPerSample != 8 && header.bitsPerSample != 16 && header.bitsPerSample != 24))
{
return nullptr;
}

// Skip over additional parameters at the end of the format chunk.
file->skip(header.subChunkSize - 16);
if (header.subchunk1Size > 16)
{
size_t extraBytes = static_cast<size_t>(header.subchunk1Size) - 16;
file->skip(extraBytes);
}

// Read the start of the data chunk.
WaveData data;
if(file->read(&data, sizeof(WaveData), 1) == 0
|| memcmp(data.chunkId, "data", 4) != 0)
{
return nullptr;
while (true) {
if (file->read(&data, sizeof(WaveData), 1) == 0)
return nullptr;
if (memcmp(data.chunkId, "data", 4) == 0)
break;
file->skip(data.chunkSize);
}

// Create a wav loader that will read the contents of the data chunk.
WavLoader* loader = new WavLoader;

loader->frequency = header.sampleRate;
loader->numChannels = header.numChannels;
loader->bytesPerSample = header.bps / 8;
loader->bytesPerSample = header.bitsPerSample / 8;
loader->numFrames = data.chunkSize / (loader->bytesPerSample * loader->numChannels);
loader->numFramesLeft = loader->numFrames;
loader->file = file;
Expand Down
3 changes: 2 additions & 1 deletion src/Editor/TextOverlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ void drawAbout()
{
vec2i size = gSystem->getWindowSize();

Text::arrange(Text::BC, "ArrowVortex release v1.0.0");
Text::arrange(Text::BC, "ArrowVortex release v1.0.1");
Text::draw(vec2i{size.x / 2, size.y / 2 - 128});
String buildDate = "Build date: " + System::getBuildData();
Text::arrange(Text::TC, buildDate.str());
Expand All @@ -618,6 +618,7 @@ void drawAbout()
"@Psycast/Velocity\n"
"@DeltaEpsilon7787/Delta Epsilon\n"
"@DolpinChips/insep\n"
"@ScottBrenner/bren\n"
"\n"
"Original program and many thanks to : \n"
"Bram 'Fietsemaker' van de Wetering\n");
Expand Down
6 changes: 3 additions & 3 deletions src/Editor/View.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ ViewImpl()
, myZoomLevel(8)
, myScaleLevel(4)
, mySnapType(ST_NONE)
, myCustomSnap(1)
, myCustomSnap(20)
, myUseTimeBasedView(true)
, myUseReverseScroll(false)
, myUseChartPreview(false)
Expand Down Expand Up @@ -100,7 +100,7 @@ void loadSettings(XmrNode& settings)
view->get("receptorX", &myReceptorX);
view->get("receptorY", &myReceptorY);

myCustomSnap = min(max(myCustomSnap, 1), 192);
myCustomSnap = min(max(myCustomSnap, 5), 191);
myZoomLevel = min(max(myZoomLevel, -2.0), 16.0);
myScaleLevel = min(max(myScaleLevel, 1.0), 10.0);
}
Expand Down Expand Up @@ -441,7 +441,7 @@ void setSnapType(int type)

void setCustomSnap(int size)
{
if (size < 1) size = 1;
if (size < 4) size = 4;
if (size > 192) size = 192;
// If the custom snap is a non-custom value, set the snap to that value instead
for (int i = 0; i < ST_CUSTOM; i++)
Expand Down
6 changes: 6 additions & 0 deletions src/Editor/Waveform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,12 @@ void sampleEdges(WaveEdge* edges, int w, int h, int channel, int blockId, bool f
return;
}

// A crash can occur if another thread is loading the audio. Just do nothing if it is.
if (!music.isAllocated())
{
return;
}

double sampleSkip = max(0.001, (samplesPerPixel / 200.0));
int wh = w / 2 - 1;

Expand Down
Loading
Loading