Browse Source

Use NTK instead of FLTK.

master
Jonathan Moore Liles 8 years ago
parent
commit
3b83f9cfe8
5 changed files with 64 additions and 54 deletions
  1. +3
    -3
      FreeEditUI.fl
  2. +49
    -39
      GUI.fl
  3. +4
    -4
      compile_linux_fftw.sh
  4. +4
    -4
      compile_linux_fftw_jack.sh
  5. +4
    -4
      compile_linux_kissfft.sh

+ 3
- 3
FreeEditUI.fl View File

@@ -86,7 +86,7 @@ fl_color(get_color(color()));
fl_rectf(ox,oy,lx,ly);

//fl_color(FL_GRAY);
fl_color(get_color(labelcolor()));
fl_color(fl_color_add_alpha( get_color(labelcolor()), 100 ));
//draw grid
fl_line_style(FL_SOLID);
for (int ncoord=0;ncoord<2;ncoord++){
@@ -149,7 +149,7 @@ for (int ncoord=0;ncoord<2;ncoord++){


//draw the line
fl_line_style(FL_SOLID,2);
fl_line_style(FL_SOLID,3);
fl_color(get_color(labelcolor()));
float *data=new float[lx];

@@ -165,7 +165,7 @@ for (int i=0;i<lx;i++){
delete[]data;

//draw points
fl_line_style(FL_SOLID,3);
fl_line_style(FL_SOLID,2);
for (int i=0;i<free_edit->get_npoints();i++){
if (!free_edit->is_enabled(i)) continue;
fl_color(FL_BLACK);


+ 49
- 39
GUI.fl View File

@@ -1,45 +1,50 @@
# data file for the Fltk User Interface Designer (fluid)
version 1.0110
version 1.0300
header_name {.h}
code_name {.cxx}
decl {//Copyright (c) Nasca Octavian Paul. Released under GNU General Public License version 2} {public
decl {//Copyright (c) Nasca Octavian Paul. Released under GNU General Public License version 2} {public local
}

decl {\#include <FL/Fl_File_Chooser.H>} {}
decl {\#include <FL/Fl_File_Chooser.H>} {private local
}

decl {\#include <FL/Fl_Box.H>} {public
decl {\#include <FL/Fl_Box.H>} {public local
}

decl {\#include <FL/Fl_Group.H>} {public
decl {\#include <FL/Fl_Group.H>} {public local
}

decl {\#include <FL/Fl_Box.H>} {public
decl {\#include <FL/Fl_Box.H>} {public local
}

decl {\#include <FL/fl_draw.H>} {public
decl {\#include <FL/fl_draw.H>} {public local
}

decl {\#include <FL/Fl_Value_Input.H>} {public
decl {\#include <FL/Fl_Value_Input.H>} {public local
}

decl {\#include <FL/fl_ask.H>} {public
decl {\#include <FL/fl_ask.H>} {public local
}

decl {\#include<sys/stat.h>} {}
decl {\#include<sys/stat.h>} {private local
}

decl {\#include <stdio.h>} {}
decl {\#include <stdio.h>} {private local
}

decl {\#include <string>} {}
decl {\#include <string>} {private local
}

decl {\#include <math.h>} {}
decl {\#include <math.h>} {private local
}

decl {\#include "Control.h"} {public
decl {\#include "Control.h"} {public local
}

decl {\#include "FreeEditUI.h"} {public
decl {\#include "FreeEditUI.h"} {public local
}

decl {\#include "version.h"} {public
decl {\#include "version.h"} {public local
}

Function {hex4n(char c)} {return_type int
@@ -95,15 +100,16 @@ if (event==FL_PASTE){
};
return Fl_Box::handle(event);} {}
}
decl {std::string drag_file;} {public
decl {std::string drag_file;} {public local
}
decl {bool new_drag_file;} {public
decl {bool new_drag_file;} {public local
}
}

class GUI {open
} {
decl {enum Mode {STOP,PLAY,PAUSE,FREEZE};} {}
decl {enum Mode {STOP,PLAY,PAUSE,FREEZE};} {private local
}
Function {GUI()} {} {
code {playing_for_button=false;
eof_for_button=false;
@@ -188,7 +194,7 @@ rendering=false;} {}
} {
Fl_Window window {
label {Paul's Extreme Sound Stretch} open
xywh {192 131 995 550} type Double resizable
xywh {459 319 995 550} type Double resizable
code0 {if(strlen(VERSION)<2) {o->color(FL_BLUE); o->label("VERSION NOT SET!!!!!!!!!!!!");};} visible
} {
Fl_Menu_Bar {} {open
@@ -258,13 +264,13 @@ render();}
} {
MenuItem {} {
label {About...}
callback {aboutwindow->show();}
callback {aboutwindow->show();} selected
xywh {15 15 30 20}
}
}
}
Fl_Tabs tabs_widget {open
xywh {5 50 985 420} box BORDER_BOX
xywh {5 50 985 420}
} {
Fl_Group {} {
label Parameters open
@@ -285,7 +291,7 @@ o->labelcolor(FL_BLUE);}
Fl_Choice mode_choice {
label {Mode:}
callback {refresh();
control.update_player_stretch();} selected
control.update_player_stretch();}
xywh {850 110 135 20} down_box BORDER_BOX
} {
MenuItem {} {
@@ -374,7 +380,7 @@ stretch_slider->do_callback();}
} {
Fl_Box stretch_free_edit {
label Graph
xywh {105 250 875 210} box FLAT_BOX color 17
xywh {105 250 875 210} box FLAT_BOX color 57 labelcolor 54
code0 {o->init(&control.ppar.stretch_multiplier,&control);}
class FreeEditUI
}
@@ -392,7 +398,7 @@ control.update_player_stretch();}
}
}
Fl_Group {} {
label Process open
label Process
xywh {5 70 985 400} hide
} {
Fl_Group {} {open
@@ -583,12 +589,12 @@ control.update_process_parameters();}
}
}
Fl_Group {} {
label ArbitraryFilter
label ArbitraryFilter open
xywh {10 245 975 220} box THIN_UP_BOX labeltype ENGRAVED_LABEL
} {
Fl_Box filter_free_edit {
label Graph
xywh {105 250 875 210} box FLAT_BOX color 206 selection_color 0
xywh {105 250 875 210} box FLAT_BOX color 57 selection_color 0 labelcolor 54
code0 {o->init(&control.ppar.free_filter,&control);}
class FreeEditUI
}
@@ -627,7 +633,7 @@ control.update_process_parameters();}
} {
Fl_Box binaural_free_edit {
label Graph
xywh {135 75 845 390} box FLAT_BOX color 135
xywh {135 75 845 390} box FLAT_BOX color 57 labelcolor 54
code0 {o->init(&control.bbpar.free_edit,&control);}
class FreeEditUI
}
@@ -664,7 +670,7 @@ control.update_process_parameters();}
}
}
Fl_Group write_to_file_group {
label {Write to file} open
label {Write to file}
xywh {5 70 985 400} hide
} {
Fl_Button render_button {
@@ -713,11 +719,11 @@ selection_pos2->value(100.0);}
}
}
Fl_Box infilename_output {
tooltip {drag audio file here to open it} xywh {5 24 1005 22} box FLAT_BOX color 17 align 84
tooltip {drag audio file here to open it} xywh {5 24 1005 22} box FLAT_BOX color 52 align 84
class DDBox
}
Fl_Group {} {open
xywh {5 475 985 70} box BORDER_BOX
xywh {5 475 985 70} box THIN_UP_BOX
} {
Fl_Group {} {open
xywh {10 490 190 40} box THIN_UP_BOX color 16
@@ -736,25 +742,25 @@ bool bypass=false;
if (Fl::event_button()==FL_RIGHT_MOUSE) bypass=true;

control.startplay(bypass);}
tooltip {Play - right click to play the original sound} xywh {20 500 40 20} box PLASTIC_UP_BOX
tooltip {Play - right click to play the original sound} xywh {20 500 40 20} labelsize 10
}
Fl_Button freeze_button {
label {@<-> F}
callback {control.freezeplay();
set_mode(FREEZE);}
tooltip Freeze xywh {65 500 40 20} box PLASTIC_UP_BOX
tooltip Freeze xywh {65 500 40 20} labelsize 10
}
Fl_Button {} {
label {@||}
callback {set_mode(PAUSE);
control.pauseplay();}
tooltip Pause xywh {110 500 40 20} box PLASTIC_UP_BOX
tooltip Pause xywh {110 500 40 20} labelsize 10
}
Fl_Button {} {
label {@square}
callback {set_mode(STOP);
control.stopplay();}
tooltip Stop xywh {155 500 40 20} box PLASTIC_UP_BOX
tooltip Stop xywh {155 500 40 20} labelsize 10
}
}
Fl_Value_Slider seek_slider {
@@ -934,10 +940,14 @@ if (infilename_output->new_drag_file){
code {tickdraw((GUI *) v);
Fl::add_timeout(1.0/3.0,tick,v);//3 fps} {}
}
decl {Control control;} {}
decl {bool playing_for_button;} {}
decl {bool rendering;} {}
decl {bool eof_for_button;} {}
decl {Control control;} {private local
}
decl {bool playing_for_button;} {private local
}
decl {bool rendering;} {private local
}
decl {bool eof_for_button;} {private local
}
}

Function {file_exists(const char *filename)} {return_type bool


+ 4
- 4
compile_linux_fftw.sh View File

@@ -2,11 +2,11 @@ outfile=paulstretch

rm -f $outfile

fluid -c GUI.fl
fluid -c FreeEditUI.fl
ntk-fluid -c GUI.fl
ntk-fluid -c FreeEditUI.fl

g++ -ggdb GUI.cxx FreeEditUI.cxx *.cpp Input/*.cpp Output/*.cpp `fltk-config --cflags` \
`fltk-config --ldflags` -laudiofile -lfftw3f -lvorbisenc -lvorbisfile -lportaudio -lpthread -lmad -lmxml -o $outfile
g++ -ggdb GUI.cxx FreeEditUI.cxx *.cpp Input/*.cpp Output/*.cpp `pkg-config ntk --cflags` \
`pkg-config ntk --libs` -laudiofile -lfftw3f -lvorbisenc -lvorbisfile -lportaudio -lpthread -lmad -lmxml -o $outfile

rm -f GUI.h GUI.cxx FreeEditUI.h FreeEditUI.cxx


+ 4
- 4
compile_linux_fftw_jack.sh View File

@@ -2,11 +2,11 @@ outfile=paulstretch

rm -f $outfile

fluid -c GUI.fl
fluid -c FreeEditUI.fl
ntk-fluid -c GUI.fl
ntk-fluid -c FreeEditUI.fl

g++ -ggdb GUI.cxx FreeEditUI.cxx *.cpp Input/*.cpp Output/*.cpp `fltk-config --cflags` \
`fltk-config --ldflags` \
g++ -ggdb GUI.cxx FreeEditUI.cxx *.cpp Input/*.cpp Output/*.cpp `pkg-config ntk --cflags` \
`pkg-config ntk --libs` \
-laudiofile -lfftw3f -lvorbisenc -lvorbisfile -lportaudio -lpthread -lmad -lmxml \
`pkg-config --cflags --libs jack samplerate` \
-DHAVE_JACK -DENABLE_RESAMPLING \


+ 4
- 4
compile_linux_kissfft.sh View File

@@ -1,11 +1,11 @@
outfile=paulstretch
rm -f $outfile

fluid -c GUI.fl
fluid -c FreeEditUI.fl
ntk-fluid -c GUI.fl
ntk-fluid -c FreeEditUI.fl


g++ -ggdb -DKISSFFT -I./contrib GUI.cxx FreeEditUI.cxx *.cpp Input/*.cpp Output/*.cpp contrib/*.c `fltk-config --cflags` \
`fltk-config --ldflags` -laudiofile -lvorbisenc -lvorbisfile -lportaudio -lpthread -lmad -lmxml -o $outfile
g++ -ggdb -DKISSFFT -I./contrib GUI.cxx FreeEditUI.cxx *.cpp Input/*.cpp Output/*.cpp contrib/*.c `pkg-config ntk --cflags` \
`pkg-config --libs` -laudiofile -lvorbisenc -lvorbisfile -lportaudio -lpthread -lmad -lmxml -o $outfile

rm -f GUI.h GUI.cxx FreeEditUI.h FreeEditUI.cxx

Loading…
Cancel
Save