Skip to content

Commit

Permalink
-c option to modify reclaim period
Browse files Browse the repository at this point in the history
  • Loading branch information
Roboron3042 committed Feb 2, 2021
1 parent 17c99ff commit f70e13e
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 2,021 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
steamcontrollersinger
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
steamcontrollersinger : main.cpp midifile/midifile.c
g++ -o steamcontrollersinger main.cpp midifile/midifile.c -lusb-1.0 -fpermissive -std=c++11
g++ -o steamcontrollersinger main.cpp midifile/midifile.c -fpermissive `pkg-config --libs --cflags libusb-1.0`
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ This project is a fork of [Pila's SteamControllerSinger](https://gitlab.com/Pila
You can find midi songs ready to be played with Steam Controller Singer in my [Personal Collection](https://mega.nz/#F!BWpEWKzB!r7WPw5bZ_domN4pk-FJsjg) (I'll keep updating it with more songs). You can also download midi songs from various websites such [musescore.com](https://musescore.com/), but they may or may not be ready to be played with Steam Controller Singer (see Midi files tips in that case).

### Usage from command prompt:
steamcontrollersinger [-r][-l DEBUG_LEVEL] [-i INTERVAL] MIDI_FILE
steamcontrollersinger [-r][-l DEBUG_LEVEL] [-i INTERVAL] [-c RECLAIM_PERIOD] MIDI_FILE

-i INTERVAL argument to choose player sleep interval (in microseconds). Lower generally means better song fidelity, but higher cpu usage, and at some point goidn lower won't improve any more. Default value is 10000

-l DEBUG_LEVEL argument to choose libusb debug level. Default is 0, no debug output. max is 4, max verbosity output

-r to enable repeat mode, which plays continously (restart the song when finished)

-c RECLAIM_PERIOD will change the default reclaiming period (2 seconds). A greater period will reduce notes hanging, but will also increase the probability of losing the control of the controller, depending on the song. All songs are known to fail with reclaim period over 5. After a failed attempt, you will need to reconnect the controller.

### Midi files tips:

Expand All @@ -35,6 +37,9 @@ Midi files may need to be edited with a software such [MidiEditor](https://www.m

## CHANGELOG

[V1.8]
* User can now define the reclaim period with -c option.

[V1.7]
* Fixed music stopped playing after a few seconds

Expand All @@ -59,3 +64,7 @@ Midi files may need to be edited with a software such [MidiEditor](https://www.m
[V1.2]
* Fixed being stuck on "Command error" when disconnecting controller while playing. Now continue playing (even if keep failing)
* Removed the now deprecated 20ms note duration reduction

## Compiling

You will need libusb(-dev) and pkgconf. If you have them, just type `make`.
Binary file removed libusb/libusb-1.0.a
Binary file not shown.
Loading

0 comments on commit f70e13e

Please sign in to comment.