Skip to content
Open
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
13 changes: 13 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
1.6.0-bacon4
QWERTY keyboard name entry for new projects
* Press A on the project name field to enter QWERTY keyboard mode
* Navigate the on-screen keyboard with D-PAD/arrows
* Press A to input the selected character
* Press B to backspace
* Press L/R to move the text cursor left/right
* Press START or select OK to exit keyboard mode
* All keyboard navigation logic extracted to reusable KeyboardLayout.h utility

1.6.0-bacon2
ProjectView Render item
When in project view, it's now possible to initiate rendering
Interpolate values in tables and phrases
R + B on single-column selection will fill values from lowest to highest

Expand All @@ -9,6 +21,7 @@
Fixes:
Add 64 bit soundfont support (#211)
Skip randomly generated project name if a directory with that name already exists (#175)
Save Song As" saves to current as well as new project (#212)

1.5.0-bacon3
Contributions:
Expand Down
13 changes: 0 additions & 13 deletions docs/LittlePiggyTrackerConf.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
06. [Key and Button Mapping](#key-and-button-mapping)
07. [Auto Repeat](#auto-repeat)
08. [Path](#path)
09. [Rendering](#rendering)
10. [Volume](#volume)
11. [Audio Configuration](#audio-configuration)
12. [MIDI Configuration](#midi-configuration)
Expand Down Expand Up @@ -246,18 +245,6 @@ You can tweak two different path:
</CONFIG>
```

## Rendering

Additionally to playing the song, LittleGPTracker can be used to render the audio to file. To control file rendering, the variable `RENDER` can be set to either `FILE`,`FILESPLIT`,`FILERT`,`FILESPLITRT`. Note that there's a small issue with the speed when using `FILE`/`FILESPLIT` so the xxRT seem like the best choice at the moment
The xxRT options render in real time
The xSPLITx options render separate files for the channels (stems)

```xml
<CONFIG>
<RENDER value='FILERT' />
</CONFIG>
```

## Volume

For \[**GP2X**/**Dingoo**\] only
Expand Down
37 changes: 22 additions & 15 deletions docs/wiki/What-is-LittlePiggyTracker.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,24 @@ After that you can copy additional wavs to the lgptRoot/lgptProject/samples dire

## New project

When creating a new project, use the Random button to generate a random name. Generate a new name with Random or edit it manually selecting characters with A and pressing up/down
Attempting to create a project with the same name in the same location produces a notification that this operation is denied
When creating a new project, you have several options for naming:

**Random Name Generation:**
- Select the "Random" button and press A to generate a random name

**QWERTY Keyboard Entry:**
- Move to the name field and press A to enter QWERTY keyboard mode
- An on-screen keyboard will appear with these controls:
- **D-PAD/Arrows:** Navigate the keyboard
- **A:** Input the selected character
- **B:** Backspace (delete character)
- **L/R:** Move the text cursor left/right within your project name
- **START or OK key:** Exit keyboard mode and return to the dialog
- The keyboard includes:
- Numbers (0-9)
- Uppercase and lowercase letters (A-Z, a-z)
- Special characters (@ | - _ < > ? ,)
- Space bar, backspace, and OK (done) buttons on the bottom row

## Multiple Projects

Expand Down Expand Up @@ -591,20 +607,11 @@ RTRG 0101: does not do anything because after looping one tick, you move forward
# Rendering

Some people exploit the analog gap between their device's headphone output and whatever they are recording with. Alternately, you can start piggy in rendering mode so it will output 16bit, 44100Hz .WAV files.
Please note that RENDER mode is not intended to be functional on the GP2X Builds.
The following values can set for RENDER in the config.xml:
The following values can set for RENDER in the project view

- Standard mode: audio is played; no render.
- FILE: File rendering: Full speed (no audio) rendering of the stereo mixdown.
- FILESPLIT: File split rendering: Full speed (no audio) rendering of each channel separately.
- FILERT: Real Time file rendering: Renders the mixdown to file WHILE playing audio. This allow to render live mode tweaks directly.
- FILESPLITRT: Real Time file split: same except all channels are rendered separately.

Here is an example of the proper XML syntax: (See [The config.xml setup guide](../LittlePiggyTrackerConf.md))

```xml
<RENDER value = "FILERT" />
```
- Off: audio is played; no render.
- Stereo: Real Time file rendering: Renders the mixdown to file WHILE playing audio. This allow to render live mode tweaks directly.
- Stems: Real Time file split: same except all channels are rendered separately.

Remember, any of the config.xml parameters can be specified to lgpt on the command line in this fashion:

Expand Down
10 changes: 0 additions & 10 deletions docs/wiki/config_xml.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,16 +199,6 @@ You can tweak two different path:
</CONFIG>
```

## Rendering

Additionally to playing the song, LittleGPTracker can be used to render the audio to file. To control file rendering, the variable RENDER can be set to either FILE,FILESPLIT,FILERT,FILESPLITRT. Note that there's a small issue with the speed when using FILE/FILESPLIT so the xxRT seem like the best choice at the moment

```xml
<CONFIG>
<RENDER value='FILERT'/>
</CONFIG>
```

## Volume

This setting is for GP2X and Dingoo only. It is used to set the volume of the hardware at startup. In decimal (base 10).
Expand Down
17 changes: 17 additions & 0 deletions docs/wiki/tips_and_tricks.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# Project Naming with QWERTY Keyboard

Since version 1.6.0, you can use an on-screen QWERTY keyboard when creating new projects:

**Quick Tips:**
- Press A on the project name to enter keyboard mode
- The keyboard cursor will jump to the character under your text cursor unless it's a space
- Use L/R shoulder buttons to move through your project name
- Erase with B and exit with Start

**Keyboard Layout:**
The on-screen keyboard is organized like this:
- Numbers
- Uppercase (A-Q + extra characters)
- Lowercase (a-q + extra characters)
- Special [Space] [Erase] [Done]

# Delays and Echoes
## Simulating LSDj's D command

Expand Down
1 change: 0 additions & 1 deletion docs/wiki/ubuntu_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,3 @@ Please remember:

##### Use Piggy as your Midi Sequencer

##### Script piggy to run in render mode from a simple xterm command
1 change: 1 addition & 0 deletions projects/lgpt.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@
<ClInclude Include="..\sources\Application\utils\fixed.h" />
<ClInclude Include="..\sources\Application\utils\HexBuffers.h" />
<ClInclude Include="..\sources\Application\utils\RandomNames.h" />
<ClInclude Include="..\sources\Application\utils\KeyboardLayout.h" />
<ClInclude Include="..\sources\Application\Player\FileEngine.h" />
<ClInclude Include="..\sources\Application\Player\Player.h" />
<ClInclude Include="..\sources\Application\Player\PlayerChannel.h" />
Expand Down
11 changes: 10 additions & 1 deletion projects/lgptest.dev
Original file line number Diff line number Diff line change
Expand Up @@ -2937,7 +2937,6 @@ Priority=1000
OverrideBuildCmd=0
BuildCmd=


[Unit288]
FileName=..\sources\Application\utils\RandomNames.h
CompileCpp=1
Expand All @@ -2948,3 +2947,13 @@ Priority=1000
OverrideBuildCmd=0
BuildCmd=

[Unit289]
FileName=..\sources\Application\utils\KeyboardLayout.h
CompileCpp=1
Folder=Application/Utils
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

156 changes: 70 additions & 86 deletions sources/Application/Mixer/MixerService.cpp
Original file line number Diff line number Diff line change
@@ -1,52 +1,34 @@
#include "MixerService.h"
#include "Application/Audio/DummyAudioOut.h"
#include "Application/Model/Config.h"
#include "Application/Model/Mixer.h"
#include "Application/Model/Project.h"
#include "Services/Audio/Audio.h"
#include "Services/Audio/AudioDriver.h"
#include "Services/Midi/MidiService.h"
#include "System/Console/Trace.h"
#include "Application/Model/Config.h"
#include "Application/Audio/DummyAudioOut.h"
#include "Application/Model/Mixer.h"

MixerService::MixerService():
out_(0),
sync_(0)
{
mode_=MSM_AUDIO ;
const char *render=Config::GetInstance()->GetValue("RENDER") ;
if (render) {
if (!strcmp(render,"FILERT")) {
mode_=MSM_FILERT ;
} ;
if (!strcmp(render,"FILE")) {
mode_=MSM_FILE ;
} ;
if (!strcmp(render,"FILESPLIT")) {
mode_=MSM_FILESPLIT ;
} ;
if (!strcmp(render,"FILESPLITRT")) {
mode_=MSM_FILESPLITRT ;
} ;
} ;
} ;
MixerService::MixerService() : out_(0), sync_(0), isRendering_(false) {
mode_ = MSRM_PLAYBACK;
};

MixerService::~MixerService() {
} ;
MixerService::~MixerService() {};

/*
* initializes the mixer service, config changes depending if we're in sequencer or render mode
*/
bool MixerService::Init() {
// create the output depending on rendering mode
out_ = 0;
// create the output depending on rendering mode
out_ = 0;
switch (mode_) {
case MSM_FILE:
case MSM_FILESPLIT:
out_ = new DummyAudioOut();
break;
default:
Audio *audio = Audio::GetInstance();
out_ = audio->GetFirst();
break;
case MSRM_STEREO:
case MSRM_STEMS:
out_ = new DummyAudioOut();
break;
default:
Audio *audio = Audio::GetInstance();
out_ = audio->GetFirst();
break;
}

for (int i=0;i<MAX_BUS_COUNT;i++) {
Expand All @@ -60,23 +42,8 @@ bool MixerService::Init() {
out_->Insert(master_);
}

switch(mode_) {
case MSM_AUDIO:
break ;
case MSM_FILERT:
case MSM_FILE:
out_->SetFileRenderer("project:mixdown.wav");
break;
case MSM_FILESPLITRT:
case MSM_FILESPLIT:
for (int i=0;i<SONG_CHANNEL_COUNT;i++) {
char buffer[1024] ;
sprintf(buffer,"project:channel%d.wav",i);
bus_[i].SetFileRenderer(buffer);
}
break;
}
out_->AddObserver(*MidiService::GetInstance());
initRendering(mode_);
out_->AddObserver(*MidiService::GetInstance());
}

sync_=SDL_CreateMutex();
Expand All @@ -90,6 +57,23 @@ bool MixerService::Init() {
return (result);
};

void MixerService::initRendering(MixerServiceRenderMode mode) {
switch(mode) {
case MSRM_PLAYBACK:
break;
case MSRM_STEREO:
out_->SetFileRenderer("project:mixdown.wav");
break;
case MSRM_STEMS:
for (int i = 0; i < SONG_CHANNEL_COUNT; i++) {
char buffer[1024];
sprintf(buffer, "project:channel%d.wav", i);
bus_[i].SetFileRenderer(buffer);
}
break;
}
}

void MixerService::Close() {
if (out_) {
out_->RemoveObserver(*MidiService::GetInstance());
Expand All @@ -98,21 +82,13 @@ void MixerService::Close() {
master_.Empty() ;

switch(mode_) {
case MSM_FILE:
case MSM_FILESPLIT:
SAFE_DELETE(out_) ;
break;
default:
break ;
}
switch(mode_) {
case MSM_FILESPLITRT:
case MSM_FILESPLIT:
break;
default:
break ;
}
}
case MSRM_STEMS:
case MSRM_STEREO:
break;
default:
break;
}
}
for (int i=0;i<MAX_BUS_COUNT;i++) {
bus_[i].Empty() ;
}
Expand All @@ -121,11 +97,17 @@ void MixerService::Close() {
sync_=0 ;
} ;

void MixerService::SetRenderMode(int mode) {
mode_ = MixerServiceRenderMode(mode);
}

bool MixerService::IsRendering() { return isRendering_; }

bool MixerService::Start() {
MidiService::GetInstance()->Start() ;
if (out_) {
out_->AddObserver(*this) ;
out_->Start() ;
MidiService::GetInstance()->Start();
if (out_) {
out_->AddObserver(*this);
out_->Start();
}
return true ;
} ;
Expand Down Expand Up @@ -181,20 +163,22 @@ int MixerService::GetPlayedBufferPercentage() {
}

void MixerService::toggleRendering(bool enable) {
switch(mode_) {
case MSM_AUDIO:
break ;
case MSM_FILERT:
case MSM_FILE:
out_->EnableRendering(enable) ;
break ;
case MSM_FILESPLITRT:
case MSM_FILESPLIT:
for (int i=0;i<SONG_CHANNEL_COUNT;i++) {
bus_[i].EnableRendering(enable) ;
} ;
break ;
}
isRendering_ = enable;
switch (mode_) {
case MSRM_PLAYBACK:
initRendering(MSRM_PLAYBACK);
break;
case MSRM_STEREO:
initRendering(MSRM_STEREO);
out_->EnableRendering(enable);
break;
case MSRM_STEMS:
initRendering(MSRM_STEMS);
for (int i = 0; i < SONG_CHANNEL_COUNT; i++) {
bus_[i].EnableRendering(enable);
};
break;
}
}

void MixerService::OnPlayerStart() {
Expand Down
Loading
Loading