Skip to content
Merged
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
2 changes: 1 addition & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Various additions

FX Command Box selector (#238)
* In phrase and table views a selection box appears when editing FX commands
* Navigate in all directions using D-PAD
Expand All @@ -22,6 +21,7 @@ Various additions
* Fixes "audio suddenly dies" error
Fix regression caused in https://github.com/djdiskmachine/LittleGPTracker/pull/245
Fix introduced microtonality for single cycle osc, thank you @INFU-AV <3
Purge samples actually purges samples [author: maks](https://github.com/xiphonics/picoTracker/pull/313)

1.6.0-bacon11
Slices decoupled from loop mode
Expand Down
6 changes: 6 additions & 0 deletions docs/wiki/tips_and_tricks.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ Since version 1.6.0, you can delete projects directly from the Project Selection

**Pro Tip:** Use Save As to store a duplicate of the project if you're uncertain if you should delete something

## Compact Instruments

Use "Compact Instruments" from the project screen to remove any samples from disk that used in any instruments. A confirmation dialog will appear before anything is deleted.

**Pro Tip:** Run this before sharing your project before sending it over ICQ

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

Expand Down
46 changes: 21 additions & 25 deletions sources/Application/Model/Project.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,7 @@ void Project::Purge() {

void Project::PurgeInstruments(bool removeFromDisk) {

bool used[MAX_INSTRUMENT_COUNT] ;
for (int i=0;i<MAX_INSTRUMENT_COUNT;i++) {
used[i]=false ;
}
bool used[MAX_INSTRUMENT_COUNT] = {false};

unsigned char *data=song_->phrase_->instr_ ;

Expand Down Expand Up @@ -275,34 +272,33 @@ void Project::PurgeInstruments(bool removeFromDisk) {

// clear used flag

bool iUsed[MAX_PIG_SAMPLES] ;
for (int i=0;i<MAX_PIG_SAMPLES;i++) {
iUsed[i]=false ;
}
bool used[MAX_PIG_SAMPLES] = {false};

// flag all samples actually used
// flag all samples actually used

for (int i=0;i<MAX_INSTRUMENT_COUNT;i++) {
I_Instrument *instrument=bank->GetInstrument(i) ;
for (int i = 0; i < MAX_INSTRUMENT_COUNT; i++) {
I_Instrument *instrument=bank->GetInstrument(i) ;
if (instrument->GetType()==IT_SAMPLE) {
SampleInstrument *si=(SampleInstrument *)instrument ;
int index=si->GetSampleIndex() ;
if (index>=0) iUsed[index]=true ;
};
}
if (index >= 0)
used[index] = true;
};
}

// Now effectively purge all unused sample from disk
// Now effectively purge all unused sample from disk

int purged=0 ;
SamplePool *sp=SamplePool::GetInstance() ;
for (int i=0;i<MAX_PIG_SAMPLES;i++) {
if ((!iUsed[i])&&(sp->GetSource(i-purged))) {
sp->PurgeSample(i-purged) ;
purged++;
} ;
} ;
}
} ;
int purged = 0;
SamplePool *sp = SamplePool::GetInstance();
for (int i = 0; i < MAX_PIG_SAMPLES; i++) {
if ((!used[i])&&(sp->GetSource(i-purged))) {
sp->PurgeSample(i - purged);
Trace::Debug("Purged sample [%d]", i - purged);
purged++;
}
}
}
}

void Project::RestoreContent(TiXmlElement *element) {

Expand Down
2 changes: 1 addition & 1 deletion sources/Application/Model/Project.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#define PROJECT_NUMBER "1"
#define PROJECT_RELEASE "6"
#define BUILD_COUNT "0-bacon12"
#define BUILD_COUNT "0-bacon13"

#define MAX_TAP 3

Expand Down
5 changes: 3 additions & 2 deletions sources/Application/Views/ProjectView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,9 @@ void ProjectView::Update(Observable &,I_ObservableData *data) {
break ;
case ACTION_PURGE_INSTRUMENT:
{
MessageBox *mb=new MessageBox(*this,"Purge unused samples from disk ?",MBBF_YES|MBBF_NO) ;
DoModal(mb,PurgeCallback) ;
MessageBox *mb = new MessageBox(*this, "Purge unused samples?",
MBBF_YES | MBBF_NO);
DoModal(mb,PurgeCallback) ;
break ;
}
case ACTION_SAVE: {
Expand Down
Loading