Skip to content

Commit

Permalink
fixed choose-file call
Browse files Browse the repository at this point in the history
  • Loading branch information
karimhaddad committed May 6, 2022
1 parent dc2d83d commit f3c8c5e
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 27 deletions.
12 changes: 6 additions & 6 deletions sources/Addi-MSP.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

(defun addicoll (add-file max-file )
"traduit les fichiers additive dans le format des coll MSP"
(let* ((file-in (if (equal add-file 'nil) (choose-file-dialog ) add-file))
(file-out (if (equal max-file 'nil) (choose-new-file-dialog ) max-file))
(let* ((file-in (if (equal add-file 'nil) (om-choose-file-dialog ) add-file))
(file-out (if (equal max-file 'nil) (om-choose-new-file-dialog ) max-file))
(window (make-array 163 :adjustable t :fill-pointer 0))
item )

Expand Down Expand Up @@ -81,7 +81,7 @@ un dialogue s'ouvre"
:doc "lit les fichiers additive et en extrait des tableaux de freq et d'amp "


(let* ((file-in (if (equal add-file 'nil) (choose-file-dialog ) add-file))
(let* ((file-in (if (equal add-file 'nil) (om-choose-file-dialog ) add-file))
(dimension (list 40 dim))
(t-freq (make-array dimension :adjustable t ))
(t-amp (make-array dimension :adjustable t ))
Expand Down Expand Up @@ -129,7 +129,7 @@ un dialogue s'ouvre"
:doc "lit les fichiers additive et en extrait des listes de freq et d'amp"


(let* ((file-in (if (equal add-file 'nil) (choose-file-dialog ) add-file))
(let* ((file-in (if (equal add-file 'nil) (om-choose-file-dialog ) add-file))
l-freq l-amp kfen nbpar )

(when file-in
Expand Down Expand Up @@ -179,7 +179,7 @@ un dialogue s'ouvre"
(let ((nharm (1- (length l-freqs)))
(nbfen (- (length (first l-freqs)) 1))
(l-freqs (om-round l-freqs 2))
(file-out (if (equal file-out "name") (choose-new-file-dialog ) file-out)))
(file-out (if (equal file-out "name") (om-choose-new-file-dialog ) file-out)))

(with-open-file (file2 file-out :direction :output
:if-exists :supersede)
Expand Down Expand Up @@ -216,4 +216,4 @@ un dialogue s'ouvre"





32 changes: 16 additions & 16 deletions sources/OM-CS.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ mulamp = multiplicateur d'intensit
:icon 132
:doc ""

(let* ((nom (if (equal fichier 'nil) (choose-new-file-dialog ) fichier))
(let* ((nom (if (equal fichier 'nil) (om-choose-new-file-dialog ) fichier))
(long (1- (length dates)))
(last-ev (- (nth long dates) (nth (1- long) dates)))
(dates (x-append dates (+ (last-elem dates ) last-ev) (+ (last-elem dates )
Expand Down Expand Up @@ -157,7 +157,7 @@ mulamp = multiplicateur d'intensit
:icon 132
:doc ""

(let* ((nom (if (equal fichier 'nil) (choose-new-file-dialog ) fichier))
(let* ((nom (if (equal fichier 'nil) (om-choose-new-file-dialog ) fichier))
(long (1- (length dates)))
(last-ev (- (nth long dates) (nth (1- long) dates)))
newDate
Expand Down Expand Up @@ -210,7 +210,7 @@ mulamp = multiplicateur d'intensit
:icon 132
:doc ""
(let* ((nom (if (equal fichier 'nil) (choose-new-file-dialog ) fichier))
(let* ((nom (if (equal fichier 'nil) (om-choose-new-file-dialog ) fichier))
(long (1- (length dates)))
(last-ev (- (nth long dates) (nth (1- long) dates)))
(dates (x-append dates (+ (last-elem dates ) last-ev) (+ (last-elem dates )
Expand Down Expand Up @@ -277,7 +277,7 @@ format spectre : ( (rangs harm) (intensit



(let* ((nom (if (equal fichier 'nil) (choose-new-file-dialog ) fichier))
(let* ((nom (if (equal fichier 'nil) (om-choose-new-file-dialog ) fichier))
(long (1- (length dates)))
(last-ev (- (nth long dates) (nth (1- long) dates)))
(dates (x-append dates (+ (last-elem dates ) last-ev) (+ (last-elem dates )
Expand Down Expand Up @@ -392,7 +392,7 @@ table d'onde; par d
format spectre : ( (rangs harm) (intensités))"


(let* ((nom (if (equal fichier 'nil) (choose-new-file-dialog ) fichier))
(let* ((nom (if (equal fichier 'nil) (om-choose-new-file-dialog ) fichier))
(frqs (mc->f (lmidic accords)))
(amps (lvel accords))
(amps (om* (om/ amps (list-max (l-sum amps))) mulamp)) ; somme des amps = 1 * mulamp
Expand Down Expand Up @@ -468,7 +468,7 @@ table d'onde; par d
format spectre : ( (rangs harm) (intensités))"


(let* ((nom (if (equal fichier 'nil) (choose-new-file-dialog ) fichier))
(let* ((nom (if (equal fichier 'nil) (om-choose-new-file-dialog ) fichier))
(muldur (/ muldur 1000)); might be in milliseconds
(frqs (mc->f (lmidic accords)))
(amps (lvel accords))
Expand Down Expand Up @@ -544,7 +544,7 @@ table d'onde; par d
format spectre : ( (rangs harm) (intensités))"


(let* ((nom (if (equal fichier 'nil) (choose-new-file-dialog ) fichier))
(let* ((nom (if (equal fichier 'nil) (om-choose-new-file-dialog ) fichier))
(muldur (/ muldur 1000))
(frqs (mc->f (lmidic accord)))
(amps (lvel accord))
Expand Down Expand Up @@ -603,7 +603,7 @@ table d'onde
format spectre : ( (rangs harm) (intensitŽs))"


(let* ((nom (if (equal fichier 'nil) (choose-new-file-dialog ) fichier))
(let* ((nom (if (equal fichier 'nil) (om-choose-new-file-dialog ) fichier))
(long (1- (length dates)))
(last-ev (- (nth long dates) (nth (1- long) dates)))
(dates (x-append dates (+ (last-elem dates ) last-ev) ))
Expand Down Expand Up @@ -669,7 +669,7 @@ format spectre : ( (rangs harm) (intensit
l'attaque utilise ins1, le reste ins2"


(let* ((nom (if (equal fichier 'nil) (choose-new-file-dialog ) fichier))
(let* ((nom (if (equal fichier 'nil) (om-choose-new-file-dialog ) fichier))
(long (1- (length dates)))
(last-ev (- (nth long dates) (nth (1- long) dates)))
(dates (x-append dates (+ (last-elem dates ) last-ev) (+ (last-elem dates )
Expand Down Expand Up @@ -757,7 +757,7 @@ l'attaque utilise ins1, le reste ins2
offset: le son peut dŽmarrer aprs un dŽlai"


(let* ((nom (if (equal fichier 'nil) (choose-new-file-dialog ) fichier))
(let* ((nom (if (equal fichier 'nil) (om-choose-new-file-dialog ) fichier))
(long (1- (length dates)))
(last-ev (- (nth long dates) (nth (1- long) dates)))
(dates (x-append dates (+ (last-elem dates ) last-ev) (+ (last-elem dates )
Expand Down Expand Up @@ -896,7 +896,7 @@ composition des listes ''sons'' : attaques dur



(let* ((nom (if (equal fichier 'nil) (choose-new-file-dialog ) fichier))
(let* ((nom (if (equal fichier 'nil) (om-choose-new-file-dialog ) fichier))

(sons (x-append (if (null son2) son1 (list son1 son2 )) sons))
(fin (list-max (mapcar 'seventh sons)))
Expand Down Expand Up @@ -1030,7 +1030,7 @@ composition des listes ''sons'' : attaques dur



(let* ((nom (if (equal fichier 'nil) (choose-new-file-dialog ) fichier))
(let* ((nom (if (equal fichier 'nil) (om-choose-new-file-dialog ) fichier))

(sons (x-append (if (null son2) son1 (list son1 son2 )) sons))
(fin (list-max (mapcar 'seventh sons)))
Expand Down Expand Up @@ -1169,7 +1169,7 @@ limite: fq maximale (pour
(doux 1)
(percu 2)))

(nom (if (equal fichier 'nil) (choose-new-file-dialog ) fichier))
(nom (if (equal fichier 'nil) (om-choose-new-file-dialog ) fichier))
(lnotes (inside accord)) ; ATTENTION ici il faut garder les notes en tant qu'objet pour le traitement plutard
(longnotes (1- (length lnotes)))
(datanal (first analyse)) ; liste des dates fentres d'analyse
Expand Down Expand Up @@ -1307,7 +1307,7 @@ limite: fq maximale (pour
:icon 132
:doc ""

(let* ((nom (if (equal fichier 'nil) (choose-new-file-dialog ) fichier))
(let* ((nom (if (equal fichier 'nil) (om-choose-new-file-dialog ) fichier))
(long (1- (length dates)))
(larg (list-max (mapcar 'length freqs)))
(last-ev (- (nth long dates) (nth (1- long) dates )))
Expand Down Expand Up @@ -1418,7 +1418,7 @@ limite: fq maximale (pour
(zeros (list (create-list (1+ nbcomp) 0)))
(l-amps (x-append l-amps zeros ))
(spectre (list! spectre))
(nom (if (equal fichier 'nil) (choose-new-file-dialog ) fichier)))
(nom (if (equal fichier 'nil) (om-choose-new-file-dialog ) fichier)))

(when nom
(with-open-file (file nom :direction :output :if-exists :supersede)
Expand Down Expand Up @@ -1470,7 +1470,7 @@ ATTENTION : entr
(l-freqs-fin (first resul))
(l-amps-fin (second resul))
(spectre (list! spectre))
(nom (if (equal fichier 'nil) (choose-new-file-dialog ) fichier)) )
(nom (if (equal fichier 'nil) (om-choose-new-file-dialog ) fichier)) )

(when nom
(with-open-file (file nom :direction :output :if-exists :supersede)
Expand Down
8 changes: 4 additions & 4 deletions sources/TMlibrairie-OM.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -8367,7 +8367,7 @@ par le canal (+ 1 2 3 selon micro-int)"

(defun read-file-list (fichier )
(let (list item
(nom (if (null fichier ) (choose-file-dialog ) fichier)))
(nom (if (null fichier ) (om-choose-file-dialog ) fichier)))
(when nom
(with-open-file (file nom :direction :input
:if-does-not-exist nil)
Expand All @@ -8378,7 +8378,7 @@ par le canal (+ 1 2 3 selon micro-int)"

(defun read-file-array (dimension fichier )
(let (item
(nom (if (equal fichier "name") (choose-file-dialog ) fichier))
(nom (if (equal fichier "name") (om-choose-file-dialog ) fichier))
(tab (make-array dimension :adjustable t :fill-pointer 0)))
(when nom
(with-open-file (file nom :direction :input
Expand Down Expand Up @@ -8411,7 +8411,7 @@ format de sortie : list par d
:icon 137
:doc " option : sŽparateur de donnŽes (rien, espace, ligne, tab)
''rien'' suppose que la liste est dŽjˆ formatŽe "
(let ((nom (if (equal fichier 'nil) (choose-new-file-dialog ) fichier))
(let ((nom (if (equal fichier 'nil) (om-choose-new-file-dialog ) fichier))
(char (case sep
(rien "" )
(espace #\Space)
Expand Down Expand Up @@ -8444,7 +8444,7 @@ options : s
fmat = nombre de chiffres pour reprŽsenter les nombres (Žvite aussi notation
exponentielle) . Si fmat=0 les nombres sont Žcrits tels quels "

(let ((nom (if (equal fichier 'nil) (choose-new-file-dialog ) fichier))
(let ((nom (if (equal fichier 'nil) (om-choose-new-file-dialog ) fichier))
(char (case sep
(espace #\Space)
(tab #\tab))))
Expand Down
2 changes: 1 addition & 1 deletion sources/speartext.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
:doc ""


(let ((nom (or fichier (choose-new-file-dialog)))
(let ((nom (or fichier (om-choose-new-file-dialog)))
(prev-frame nil)
(prev-time nil))

Expand Down

0 comments on commit f3c8c5e

Please sign in to comment.